Python script does not work!

Hey. I have written this script, and it worked fine. But now when I start blender again and try it it does not work. Ain’t getting any error either. Does anyone have the same problem or know what to do. Happy for any help.

import bge

def main():

cont = bge.logic.getCurrentController()
player = cont.owner
keyboard = bge.logic.keyboard
mouse = bge.logic.mouse
JUST_ACTIVE = bge.logic.KX_INPUT_ACTIVE

#playerSpeed
speed = 5
LR = 5
#‘Reset’ Rotation
if JUST_ACTIVE == keyboard.events[bge.events.RKEY]:
player.applyRotation((0, .1, 0), True)
#Move Forward
if JUST_ACTIVE == keyboard.events[bge.events.WKEY]:
player.applyForce((0, speed, 0), True)
#Move Back
if JUST_ACTIVE == keyboard.events[bge.events.SKEY]:
player.applyForce((0, -speed, 0), True)
#Strafe Left
if JUST_ACTIVE == keyboard.events[bge.events.QKEY]:
player.applyForce((-speed, 0, 0), True)
#Strafe Right
if JUST_ACTIVE == keyboard.events[bge.events.EKEY]:
player.applyForce((speed, 0, 0), True)
#Rotate Left
if JUST_ACTIVE == keyboard.events[bge.events.AKEY]:
player.applyTorque((0, 0, LR),True)
#Rotate Right
if JUST_ACTIVE == keyboard.events[bge.events.DKEY]:
player.applyTorque((0, 0, -LR),True)