--pavetr.top/ds local a = { viewangles = 0, forwardmove = 0, sidemove = 0, upmove = 0, buttons = 0, impulse = 0, mousex = 0, mousey = 0 } a.__index = a; local function b(c) local d = setmetatable({}, a) d.viewangles = exechack_api.GetCheatAngle() d.forwardmove = c:GetForwardMove() d.sidemove = c:GetSideMove() d.upmove = c:GetUpMove() d.buttons = c:GetButtons() d.impulse = c:GetImpulse() d.mousex = c:GetMouseX() d.mousey = c:GetMouseY() return d end; local function e(c, d) exechack_api.SetCheatAngle(d.viewangles) c:SetForwardMove(d.forwardmove) c:SetSideMove(d.sidemove) c:SetUpMove(d.upmove) c:SetButtons(d.buttons) c:SetImpulse(d.impulse) c:SetMouseX(d.mousex) c:SetMouseY(d.mousey) end; surface.CreateFont("chitfont18", { font = "Roboto", size = 18 }) surface.CreateFont("chitfont22", { font = "Roboto", size = 22 }) local f = {} f.startkey = KEY_7; f.playkey = KEY_8; f.autoplay = false; f.toscticks = 0; f.toreticks = 0; f.ppos = Vector(0,0,0) local g = {} local h = 6; include("vgui/dbinder.lua") local i = vgui.Create("DFrame") i:SetSize(428, 250) i:SetPos(10, 10) i:SetTitle("") i.Paint = function(j, k, l) draw.RoundedBox(0, 0, 0, k, l, Color(35, 35, 35)) draw.RoundedBox(0, 0, 0, k, 22, Color(45, 45, 45)) draw.SimpleText("recorder for exechack v2", "chitfont18", 5, 2.5, Color(255, 255, 255)) surface.SetDrawColor(Color(100, 100, 100)) surface.DrawOutlinedRect(0, 0, k, l) if h == 1 then draw.SimpleText("Recording "..f.toreticks, "chitfont22", 3, 33, Color(255, 0, 0), 0, 1) elseif h == 2 then draw.SimpleText("Playing "..f.toscticks.."/"..f.toreticks, "chitfont22", 3, 33, Color(0, 255, 0), 0, 1) elseif h == 0 then draw.SimpleText("Stopped", "chitfont22", 3, 33, Color(255, 255, 255), 0, 1) elseif h == 6 then draw.SimpleText("Press 7 to record, press 8 to play", "chitfont22", 3, 33, Color(255, 255, 255), 0, 1) end; end; local q = vgui.Create("DBinder", i) q:SetFont("chitfont18") q:SetText("Start/stop record key") q:SetTextColor(Color(255, 255, 255)) q:SetSize(150, 25) q:SetPos(3, 45) q.Paint = function(j, k, l) draw.RoundedBox(0, 0, 0, k, l, Color(35, 35, 35)) surface.SetDrawColor(Color(100, 100, 100)) surface.DrawOutlinedRect(0, 0, k, l) if q.Hovered then draw.RoundedBox(0, 0, 0, k, l, Color(120, 120, 120, 100)) end end; q.OnChange = function(r) f.startkey = r:GetValue() surface.SetFont("chitfont18") q:SetSize(select(1, surface.GetTextSize(q:GetText())) + 10, 25) end; local q = vgui.Create("DBinder", i) q:SetFont("chitfont18") q:SetText("Play/stop record key") q:SetTextColor(Color(255, 255, 255)) q:SetSize(150, 25) q:SetPos(3, 72) q.Paint = function(j, k, l) draw.RoundedBox(0, 0, 0, k, l, Color(35, 35, 35)) surface.SetDrawColor(Color(100, 100, 100)) surface.DrawOutlinedRect(0, 0, k, l) if q.Hovered then draw.RoundedBox(0, 0, 0, k, l, Color(120, 120, 120, 100)) end end; q.OnChange = function(r) f.playkey = r:GetValue() surface.SetFont("chitfont18") q:SetSize(select(1, surface.GetTextSize(q:GetText())) + 10, 25) end; local s = i:Add("DCheckBoxLabel") s:SetPos(3, 99) s:SetText("Auto Play") s:SetFont("chitfont18") s:SetTextColor(Color(255, 255, 255)) s:SetValue(f.autoplay) function s.Button:Paint(t, u) if self:GetChecked() then surface.SetDrawColor(65, 95, 200) surface.DrawRect(0, 0, t, u) end; surface.SetDrawColor(Color(100, 100, 100)) surface.DrawOutlinedRect(0, 0, t, u) end; function s:OnChange() f.autoplay = not f.autoplay end; local function movetostart(destination, cmd) local deg2rad = (math.pi / 180) local deltaView, f1, f2 local viewangle_x = exechack_api.GetCheatAngle()["pitch"] local viewangle_y = exechack_api.GetCheatAngle()["yaw"] local viewangle_z = exechack_api.GetCheatAngle()["roll"] local fOldForward = cmd:GetForwardMove() local fOldSidemove = cmd:GetSideMove() if (destination < 0) then f1 = 360 + destination else f1 = destination end if (viewangle_y < 0) then f2 = 360 + viewangle_y else f2 = viewangle_y end if (f2 < f1) then deltaView = math.abs(f2 - f1) else deltaView = 360 - math.abs(f1 - f2) end deltaView = 360 - deltaView cmd:SetForwardMove(math.cos((deg2rad * deltaView)) * fOldForward + math.cos((deg2rad * (deltaView + 90))) * fOldSidemove) cmd:SetSideMove(math.sin((deg2rad * deltaView)) * fOldForward + math.sin((deg2rad * (deltaView + 90))) * fOldSidemove) end local function v() local w = 1; g = {} local function y(d) table.insert(g, d) end; f.ppos = LocalPlayer():GetPos() hook.Add("CreateMove", "RecordMovement", function(c) if input.IsKeyDown(KEY_5) then h = 0; hook.Remove("CreateMove", "RecordMovement") end; if c:CommandNumber() == 0 then return end; w = w + 1; f.toreticks = w; h = 1; local d = b(c) y(d) end) end; local function z() local A = 0; hook.Add("CreateMove", "RecordMovement", function(c) if c:CommandNumber() == 0 then return end; if LocalPlayer():GetPos():Distance(f.ppos)>10 and h~=2 then c:SetButtons(bit.bor(c:GetButtons(), IN_SPEED)) c:SetForwardMove(1000) c:SetSideMove(0) local x, y, z = (Vector(f.ppos) - LocalPlayer():GetPos()):Angle() local ang2 = Angle(x, y, z)[2] movetostart(ang2, c) return end h = 2; A = A + 1; f.toscticks = A; local d = g[A] if d then e(c, d) end; if A >= f.toreticks then h = 0; hook.Remove("CreateMove", "RecordMovement") return end end) end; hook.Add("Think", "1", function() if input.IsKeyDown(f.startkey) and f.stak == nil then f.stak = false; timer.Simple(1, function() f.stak = nil end) if h==1 then h = 0; hook.Remove("CreateMove", "RecordMovement") return end v() end; if input.IsKeyDown(f.playkey) and f.plak == nil then f.plak = false; timer.Simple(1, function() f.plak = nil end) if h==2 then h = 0; hook.Remove("CreateMove", "RecordMovement") return end z() end; if f.autoplay and h == 0 then z() end end)