local state = {} function bomb_init(e) state[e] = "active" end function bomb_main(e) if state[e] == "active" then if GetPlayerDistance(e) < 600 then LoopSound(e,0) else StopSound(e,0) end if GetPlayerDistance(e) < 150 then PromptLocal(e,"Disarm the bomb? *e*") if GetInKey() == "e" and pressed == 0 then state[e] = "disarmed" bombs_disarmed = bombs_disarmed + 1 pressed = 1 end end elseif state[e] == "disarmed" then StopSound(e,0) if GetPlayerDistance(e) < 150 then PromptLocal(e,"Bomb Disarmed") end end --state end --main function bomb_exit(e) end