vtrvsted

W anti aim

Sep 18th, 2022
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.18 KB | None | 0 0
  1. IsFirstPerson = false
  2. ShiftHeld = false
  3. WHeld = false
  4. SHeld = false
  5. AHeld = false
  6. DHeld = false -- LMFAO
  7. local gcheck = true
  8. urspeed = 0.05 -- The lower it is the faster. So don't worry about it being minus 1
  9.  
  10.  
  11. function ChangeFaster(inputObject, gameProcessedEvent)
  12.     if inputObject.KeyCode == Enum.KeyCode.N and gameProcessedEvent == false then        
  13. urspeed = urspeed - 0.025
  14.     end
  15. end
  16.  
  17.  
  18.  
  19. function ChangeSlower(inputObject, gameProcessedEvent)
  20.     if inputObject.KeyCode == Enum.KeyCode.M and gameProcessedEvent == false then        
  21. urspeed = urspeed + 0.025
  22.     end
  23. end
  24.  
  25.  
  26.  
  27. function GChecker(inputObject, gameProcessedEvent)
  28.     if inputObject.KeyCode == Enum.KeyCode.T and gameProcessedEvent == false then        
  29. if gcheck == false then
  30. gcheck = true
  31. elseif gcheck == true then
  32. gcheck = false
  33. end
  34.  
  35.     end
  36. end
  37.  
  38. game:GetService("UserInputService").InputBegan:connect(GChecker)
  39.  
  40.  
  41.  
  42. function PressShift(inputObject,gameProcessedEvent)
  43.     if inputObject.KeyCode == Enum.KeyCode.LeftShift and gameProcessedEvent == false and gcheck == true then
  44.         ShiftHeld = true
  45.     end
  46. end
  47.  
  48. function ReleaseShift(inputObject,gameProcessed)
  49.     if inputObject.KeyCode == Enum.KeyCode.LeftShift then
  50.         ShiftHeld = false
  51.     end
  52. end
  53.  
  54.  
  55. function PressW(inputObject,gameProcessedEvent)
  56.     if inputObject.KeyCode == Enum.KeyCode.W and gameProcessedEvent == false and gcheck == true then
  57.         WHeld = true
  58.     end
  59. end
  60.  
  61. function ReleaseW(inputObject,gameProcessed)
  62.     if inputObject.KeyCode == Enum.KeyCode.W then
  63.         WHeld = false
  64.     end
  65. end
  66.  
  67. function PressS(inputObject,gameProcessedEvent)
  68.     if inputObject.KeyCode == Enum.KeyCode.S and gameProcessedEvent == false and gcheck == true then
  69.         SHeld = true
  70.     end
  71. end
  72.  
  73. function ReleaseS(inputObject,gameProcessed)
  74.     if inputObject.KeyCode == Enum.KeyCode.S then
  75.         SHeld = false
  76.     end
  77. end
  78.  
  79.  
  80. function PressA(inputObject,gameProcessedEvent)
  81.     if inputObject.KeyCode == Enum.KeyCode.A and gameProcessedEvent == false and gcheck == true then
  82.         AHeld = true
  83.     end
  84. end
  85.  
  86. function ReleaseA(inputObject,gameProcessed)
  87.     if inputObject.KeyCode == Enum.KeyCode.A then
  88.         AHeld = false
  89.     end
  90. end
  91.  
  92.  
  93. function PressD(inputObject,gameProcessedEvent)
  94.     if inputObject.KeyCode == Enum.KeyCode.D and gameProcessedEvent == false and gcheck == true then
  95.         DHeld = true
  96.     end
  97. end
  98.  
  99. function ReleaseD(inputObject,gameProcessed)
  100.     if inputObject.KeyCode == Enum.KeyCode.D then
  101.         DHeld = false
  102.     end
  103. end
  104.  
  105. function CheckFirst(inputObject,gameProcessed)
  106.     if inputObject.KeyCode == Enum.UserInputType.MouseWheel then
  107.         if (player.Character.Head.CFrame.p - workspace.CurrentCamera.CFrame.p).magnitude < 0.6 then
  108.             IsFirstPerson = true
  109.     elseif (player.Character.Head.CFrame.p - workspace.CurrentCamera.CFrame.p).magnitude > 0.6 then
  110.         IsFirstPerson = false
  111.         end
  112.     end
  113. end
  114.  
  115. game:GetService("UserInputService").InputBegan:connect(PressShift)
  116. game:GetService("UserInputService").InputEnded:connect(ReleaseShift)
  117.  
  118. game:GetService("UserInputService").InputBegan:connect(PressW)
  119. game:GetService("UserInputService").InputEnded:connect(ReleaseW)
  120.  
  121. game:GetService("UserInputService").InputBegan:connect(PressS)
  122. game:GetService("UserInputService").InputEnded:connect(ReleaseS)
  123.  
  124. game:GetService("UserInputService").InputBegan:connect(PressA)
  125. game:GetService("UserInputService").InputEnded:connect(ReleaseA)
  126.  
  127. game:GetService("UserInputService").InputBegan:connect(PressD)
  128. game:GetService("UserInputService").InputEnded:connect(ReleaseD)
  129.  
  130. game:GetService("UserInputService").InputChanged:connect(CheckFirst)
  131.  
  132. game:GetService("UserInputService").InputBegan:connect(ChangeFaster)
  133. game:GetService("UserInputService").InputBegan:connect(ChangeSlower)
  134.  
  135.  
  136. game:GetService('RunService').Stepped:connect(function()
  137. if ShiftHeld == true then
  138.  
  139. if WHeld == true then
  140. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-urspeed)
  141. end
  142.  
  143. if SHeld == true then
  144. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,urspeed)
  145. end
  146.  
  147. if DHeld == true then
  148. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(urspeed,0,0)
  149. end
  150.  
  151. if AHeld == true then
  152. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(-urspeed,0,0)
  153. end
  154.  
  155.  
  156. end
  157. end)
  158.  
  159. repeat
  160.     wait()
  161. until game:IsLoaded()
  162. local gm = getrawmetatable(game)
  163. setreadonly(gm, false)
  164. local namecall = gm.__namecall
  165. gm.__namecall =
  166.     newcclosure(
  167.     function(self, ...)
  168.         local args = {...}
  169.         if not checkcaller() and getnamecallmethod() == "FireServer" and tostring(self) == "MainEvent" then
  170.             if tostring(getcallingscript()) ~= "Framework" then
  171.                 return
  172.             end
  173.         end
  174.         if not checkcaller() and getnamecallmethod() == "Kick" then
  175.             return
  176.         end
  177.         return namecall(self, unpack(args))
  178.     end
  179. )
  180.  
Add Comment
Please, Sign In to add comment