--DESCRIPTION:Jump-Scare by Smallg --script by smallg local appearances = {} local fade_delay = {} local hidden = {} local fade_delay_init = 0 --set these to 0 if you dont want any movement from original location --how far away from starting location entity can move in x axis local movex_random = 0 --how far away from starting location entity can move in z axis local movez_random = 0 function jumpscaremove_init(e) --how many times entity will appear appearances[e] = math.random(1,1) --how long between appearances (and how long it will appear for) --is randomed so can be 25% shorter or longer (see near end of script) fade_delay[e] = 3000 --------------- hidden[e] = 1 CollisionOff(e) fade_delay_init = fade_delay[e] Hide(e) end function jumpscaremove_main(e) CollisionOff(e) if g_Entity[e]['activated'] == 1 then if GetTimer(e) > fade_delay[e] then if appearances[e] > 0 then if hidden[e] == 1 then PlaySound(e,1) Show(e) SetAnimation(0) PlayAnimation(e) hidden[e] = 0 appearances[e] = appearances[e] - 1 else Hide(e) hidden[e] = 1 end else if hidden[e] == 0 then Hide(e) end end fade_delay[e] = GetTimer(e) + fade_delay_init end end end --main function jumpscaremove_exit(e) end