Python script from 2.7x to 2.49b

Hello friends, I am doing a game where I will have a slow motion and I need you to help me translate this script to the old BGE Blender 2.49b, thanks friends.

Slow Motion Script 2.7x

from bge import logic

cont = logic.getCurrentController()
own = cont.owner

s = cont.sensors[“S”].positive

if s:
if own[“slow”] > 0.1:
own [“slow”] -= 0.05
logic.setTimeScale(own[“slow”])
else:
if own[“slow”] < 1:
own[“slow”] += 0.05
logic.setTimeScale(own[“slow”])

You can see works here :

Just press S key to see slow motion

Attachments

SLOWMOTION2.7x.blend (459 KB)