Advertisement
CaliberMag

Untitled

Nov 7th, 2020 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. local RunService = game:GetService("RunService")
  2. local Player = game:GetService("Players").LocalPlayer
  3. local Mouse = Player:GetMouse()
  4.  
  5. warn("~ Praise le vleen! ~")
  6.  
  7. local Keybind = _G.keybind
  8.  
  9. local Enabled = false
  10. Mouse.KeyDown:Connect(function(Key)
  11. if Key == Keybind then
  12. Lock()
  13. end
  14. end)
  15.  
  16. local function GetEnemies()
  17. local Table = {}
  18. for t, k in pairs(_G.path:GetChildren()) do
  19. table.insert(Table, k)
  20. end
  21. return Table
  22. end
  23.  
  24. function Lock()
  25. if Enabled == false and Mouse.Target then
  26. local CurrentEnemies = GetEnemies()
  27. for _, v in pairs(CurrentEnemies) do
  28. if Mouse.Target.Parent:FindFirstChild("HumanoidRootPart") and (Mouse.Target.Parent.HumanoidRootPart.Position - Player.Character.HumanoidRootPart.Position).Magnitude <= 15 then
  29. local Target = Mouse.Target.Parent:FindFirstChild("HumanoidRootPart")
  30. if RenderStep then
  31. RenderStep:Disconnect()
  32. end
  33. RenderStep = RunService.RenderStepped:Connect(function()
  34. if not Target then
  35. RenderStep:Disconnect()
  36. Enabled = false
  37. end
  38. if Target.Parent.Humanoid.Health <= 0 then
  39. RenderStep:Disconnect()
  40. Enabled = false
  41. end
  42. if Player.Character.Humanoid.Health <= 0 then
  43. RenderStep:Disconnect()
  44. Enabled = false
  45. end
  46. Player.Character.HumanoidRootPart.CFrame = Target.CFrame + Target.CFrame.LookVector * _G.distance
  47. end)
  48. Enabled = true
  49. end
  50. break
  51. end
  52. else
  53. RenderStep:Disconnect()
  54. Enabled = false
  55. end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement