Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Controls:
- -- Press LT and Dpad Down to toggle mod on
- -- Aim (LT) to reduce speed to 25%
- local SloMo = {}
- local mod = false
- local mod_toggle = false
- function SloMo.unload()
- end
- function SloMo.init()
- end
- function SloMo.tick()
- local playerPed = PLAYER.PLAYER_PED_ID()
- local player = PLAYER.GET_PLAYER_PED(playerPed)
- local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
- if not playerExists then
- return
- end
- if(CONTROLS.IS_CONTROL_PRESSED(2,10)) and (CONTROLS.IS_CONTROL_JUST_PRESSED(2,19))then
- mod_toggle = true
- elseif mod_toggle then
- mod_toggle=false
- if(mod)then
- mod=false
- GAMEPLAY.SET_TIME_SCALE(1)
- UI._SET_NOTIFICATION_TEXT_ENTRY("STRING");
- UI._ADD_TEXT_COMPONENT_STRING("Deadeye ~r~Off~r~");
- UI._DRAW_NOTIFICATION(false, false);
- print("mod = false")
- else
- mod=true
- UI._SET_NOTIFICATION_TEXT_ENTRY("STRING");
- UI._ADD_TEXT_COMPONENT_STRING("Deadeye ~g~On~g~");
- UI._DRAW_NOTIFICATION(false, false);
- print("mod = true")
- end
- end
- if(mod)then
- --[[UI.SET_TEXT_FONT(0)
- UI.SET_TEXT_SCALE(0.1, 0.25)
- UI.SET_TEXT_COLOUR(255, 255, 255, 255)
- UI.SET_TEXT_CENTRE(true)
- UI.SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0)
- UI.SET_TEXT_EDGE(0, 0, 0, 0, 0)
- UI._SET_TEXT_ENTRY("STRING")
- UI._ADD_TEXT_COMPONENT_STRING("SloMo")
- UI._DRAW_TEXT(0.05,0.02)]]
- if PLAYER.IS_PLAYER_FREE_AIMING(player) then
- if CONTROLS.GET_CONTROL_NORMAL(2, 10) >= 0.9 then --this is at least 90% pressed, change it to your liking.
- GAMEPLAY.SET_TIME_SCALE(.25) --this is 25% speed, change this number to your liking.
- else
- GAMEPLAY.SET_TIME_SCALE(1)
- end
- end
- end
- end
- return SloMo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement