Prevent Move issue event for Specific User

Hi, I am trying to create a custom listener script that triggers move issue event. What I want to do is to fire the event when the issue creator does not equal a specific user.
This is my script :

`import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.opensymphony.workflow.InvalidInputException

def user =ComponentAccessor.userManager.getUserByName("admin")
def creator = event.issue.creator
if (user.equals(creator)){
  // dont fire  move event  
 UserMessageUtil.warning("Cant move this issue")

   // fire move event 

Jira Event Listeners are only evaluated AFTER the event occurs – You cannot cancel operations or actions in Jira via Event Listeners, it’s not possible.

Use the Scriptrunner fragment “Hide system or plugin UI element”


Thank you for your answer, I will mark it as solution