Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- By Spec122
- local realtime, delay, FPS_Buffer = 0
- local FPS = 0
- local curtime = 0
- local realtime = 0
- local delaybuf = 0
- local fpsbuf = 0
- local misc_m = gui.Reference("MISC", "GENERAL", "BYPASS")
- local Gbox_ext = gui.Groupbox(misc_m, "Extended Functions", 0, 150, 200, 450)
- local AdaptiveFps_c = gui.Checkbox(Gbox_ext, "msc_hitlog", "AdaptiveFps", 1)
- local delay = gui.Slider(Gbox_ext,delay,"Adaptive Switch Delay", 3, 0.3,10)
- local RenderFont = draw.CreateFont("Tahoma", 25, 1300)
- local function GameFPS()
- FPS = 0.9 * FPS + (1.0 - 0.9) * globals.AbsoluteFrameTime();
- return math.floor((1.0 / FPS) + 0.5);
- end
- function isFPSLow()
- if AdaptiveFps_c:GetValue() then
- fps = GameFPS()
- local w,h = draw.GetScreenSize()
- draw.SetFont(RenderFont)
- realtime = globals.CurTime()
- delaybuf = delay:GetValue()
- if entities.GetLocalPlayer() ~= nil then
- draw.CreateFont(RenderFont)
- if fps <= 60 then
- if ((realtime - curtime) > delaybuf) or GameFPS() < fpsbuf then
- gui.SetValue("rbot_positionadjustment", "5")
- gui.SetValue("rbot_autosniper_hitbox_adaptive", 1)
- gui.SetValue("rbot_pistol_hitbox_adaptive", 1)
- gui.SetValue("rbot_revolver_hitbox_adaptive", 1)
- gui.SetValue("rbot_sniper_hitbox_adaptive", 1)
- gui.SetValue("rbot_scout_hitbox_adaptive", 1)
- curtime = globals.CurTime()
- fpsbuf = GameFPS()
- end
- elseif fps <= 120 then
- if (realtime - curtime) > delaybuf or GameFPS() < fpsbuf then
- gui.SetValue("rbot_positionadjustment", "2")
- gui.SetValue("rbot_autosniper_hitbox_adaptive", 0)
- gui.SetValue("rbot_pistol_hitbox_adaptive", 0)
- gui.SetValue("rbot_revolver_hitbox_adaptive", 0)
- gui.SetValue("rbot_sniper_hitbox_adaptive", 0)
- gui.SetValue("rbot_scout_hitbox_adaptive", 0)
- curtime = globals.CurTime()
- fpsbuf = GameFPS()
- end
- else
- if (realtime - curtime) > delaybuf or GameFPS() < fpsbuf then
- gui.SetValue("rbot_positionadjustment", "3")
- gui.SetValue("rbot_autosniper_hitbox_adaptive", 0)
- gui.SetValue("rbot_autosniper_hitbox_adaptive", 0)
- gui.SetValue("rbot_pistol_hitbox_adaptive", 0)
- gui.SetValue("rbot_revolver_hitbox_adaptive", 0)
- gui.SetValue("rbot_sniper_hitbox_adaptive", 0)
- gui.SetValue("rbot_scout_hitbox_adaptive", 0)
- curtime = globals.CurTime()
- fpsbuf = GameFPS()
- draw.CreateFont(DefalutFont)
- end
- end
- end
- end
- end
- callbacks.Register( "Draw", "isFPSLow", isFPSLow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement