Advertisement
Destroy666j

Untitled

Apr 22nd, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. -- copied from the internet
  2.  
  3. -- anti afk
  4. local vu = game:GetService("VirtualUser")
  5. game:GetService("Players").LocalPlayer.Idled:connect(function()
  6. vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  7. wait(1)
  8. vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  9. end)
  10.  
  11. -- tp function
  12. function tp(x,y,z)
  13. G_valtomove = 12
  14. moving = true
  15. if x < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X then
  16. while x < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X do
  17. wait()
  18. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X-G_valtomove,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z))
  19. end
  20. end
  21. if z < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z then
  22. while z < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z do
  23. wait()
  24. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z-G_valtomove))
  25. end
  26. end
  27. if x > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X then
  28. while x > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X do
  29. wait()
  30. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X+G_valtomove,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z))
  31. end
  32. end
  33. if z > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z then
  34. while z > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z do
  35. wait()
  36. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z+G_valtomove))
  37. end
  38. end
  39. if y < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y then
  40. while y < game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y do
  41. wait()
  42. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y-G_valtomove,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z))
  43. end
  44. end
  45. if y > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y then
  46. while y > game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y do
  47. wait()
  48. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y+G_valtomove,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z))
  49. end
  50. end
  51. moving = false
  52. end
  53. -- not anymore
  54.  
  55. spawn (function()
  56. game:getService("RunService"):BindToRenderStep("",0,function()
  57. if not game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid") then return end
  58. if moving == true then
  59. game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid"):ChangeState(11)
  60. end
  61. end)
  62. end)
  63. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x,y,z))
  64.  
  65.  
  66. function teleporting()
  67. while wait() do
  68. oldgold = game.Players.LocalPlayer.Data.Gold.Value
  69.  
  70. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-65.8, 35, -200))
  71.  
  72. wait(0.1)
  73.  
  74. tp(-65.8,35, 9520)
  75. wait(0.1)
  76. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-60.8,-360, 9522))
  77. while oldgold == game.Players.LocalPlayer.Data.Gold.Value do
  78. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-60.8,-360, 9522))
  79. wait(5)
  80. end
  81. end
  82.  
  83. end
  84.  
  85. function loop()
  86. status, err = pcall(teleporting)
  87. if status then
  88. print("No errors")
  89. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-65.8, 35, -200))
  90. wait(0.1)
  91. loop()
  92. else
  93. print("Big oof")
  94. print(err)
  95. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-65.8, 35, -200))
  96. wait(0.1)
  97. loop()
  98. end
  99.  
  100. end
  101.  
  102. loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement