Vanihgol33

AFTOFARM DON'T Press The button 4! Update

May 8th, 2023 (edited)
1,748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.47 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local Workspace = game:GetService("Workspace")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local player = Players.LocalPlayer
  6.  
  7. local gui = Instance.new("ScreenGui")
  8. gui.Parent = game.CoreGui
  9. gui.ResetOnSpawn = false
  10.  
  11. local frame = Instance.new("Frame", gui)
  12. frame.Size = UDim2.new(0, 260, 0, 230)
  13. frame.Position = UDim2.new(0.5, -130, 0.5, -115)
  14. frame.BackgroundColor3 = Color3.fromRGB(10,10,10)
  15. frame.BorderSizePixel = 0
  16. frame.Active = true
  17. frame.Draggable = true
  18. Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 16)
  19.  
  20. local title = Instance.new("TextLabel", frame)
  21. title.Size = UDim2.new(1, 0, 0, 40)
  22. title.BackgroundTransparency = 1
  23. title.Text = "Don't press the button 4 script"
  24. title.TextColor3 = Color3.new(1,1,1)
  25. title.Font = Enum.Font.GothamBold
  26. title.TextScaled = true
  27.  
  28. local function makeButton(text, y)
  29.     local b = Instance.new("TextButton", frame)
  30.     b.Size = UDim2.new(1, -30, 0, 45)
  31.     b.Position = UDim2.new(0, 15, 0, y)
  32.     b.Text = text
  33.     b.Font = Enum.Font.GothamBold
  34.     b.TextScaled = true
  35.     b.BackgroundColor3 = Color3.fromRGB(0,170,0)
  36.     b.TextColor3 = Color3.new(1,1,1)
  37.     b.BorderSizePixel = 0
  38.     Instance.new("UICorner", b).CornerRadius = UDim.new(0, 12)
  39.     return b
  40. end
  41.  
  42. local btnPress = makeButton("Auto Button Press : OFF", 50)
  43. local btnMap   = makeButton("AutoPlay 40+ Game : OFF", 105)
  44. local btnCoin  = makeButton("Auto Coin Farm : OFF", 160)
  45.  
  46. local pressEnabled = false
  47. local cd = workspace.ButtonPresser.Button.ClickDetector
  48.  
  49. task.spawn(function()
  50.     while true do
  51.         if pressEnabled then
  52.             fireclickdetector(cd)
  53.         end
  54.         task.wait(0.05)
  55.     end
  56. end)
  57.  
  58. btnPress.MouseButton1Click:Connect(function()
  59.     pressEnabled = not pressEnabled
  60.     btnPress.Text = "Auto Button Press : " .. (pressEnabled and "ON" or "OFF")
  61.     btnPress.BackgroundColor3 = pressEnabled and Color3.fromRGB(200,50,50) or Color3.fromRGB(0,170,0)
  62. end)
  63.  
  64. local enabled = false
  65. local lastHRPPos = nil
  66.  
  67. local mapSettings = {
  68.     Map3   = {teleport = Vector3.new(339.85, 46.46, -247.20)},
  69.     Map84  = {teleport = Vector3.new(437.44, 33.86, 3.76)},
  70.     Map71  = {teleport = Vector3.new(-26.66, 88.00, -278.77)},
  71.     Map147 = {teleport = Vector3.new(-4.64, 43.96, 692.34)},
  72.     Map83  = {teleport = Vector3.new(-3.76, 70.77, 8.53)},
  73.     Map162 = {teleport = Vector3.new(6.19, 106.88, -94.12)},
  74.     Map78  = {teleport = Vector3.new(-1.27, 76.04, -344.36)},
  75.     Map82  = {teleport = Vector3.new(-3.84, 94.81, -236.77)},
  76.     Map32  = {teleport = Vector3.new(-131.50, 105.13, 176.07)},
  77.     Map137 = {teleport = Vector3.new(-1.05, 134.25, -114.47)},
  78.     Map100 = {teleport = Vector3.new(7.29, 72.65, -186.99)},
  79.     Map80  = {teleport = Vector3.new(-21.35, 354.65, -256.92)},
  80.     Map129 = {teleport = Vector3.new(-19.42, 85.93, -127.14)},
  81.     Map127 = {teleport = Vector3.new(7.25, 79.41, -161.16)},
  82.     Map128 = {teleport = Vector3.new(-275.70, 137.56, -106.87)},
  83.     Map105 = {teleport = Vector3.new(1.68, 146.41, 17.13)},
  84.     Map111 = {teleport = Vector3.new(-11.56, 146.41, 9.48)},
  85.     Map152 = {teleport = Vector3.new(355.57, 188.19, -167.26)},
  86.     Map167 = {teleport = Vector3.new(-8.03, 174.60, 277.55)},
  87.     Map143 = {teleport = Vector3.new(-11.01, 188.34, 20.95)},
  88.     Map125 = {teleport = Vector3.new(0.37, 263.67, -37.20)},
  89.     Map135 = {teleport = Vector3.new(-3.84, 146.09, -557.43)},
  90.     Map119 = {teleport = Vector3.new(1.23, -272.35, 234.22)},
  91.     Map95  = {teleport = Vector3.new(3.32, 146.41, 9.13)},
  92.     Map28  = {freeze = true},
  93.     Map148 = {teleport = Vector3.new(-305.45, 453.01, -1.55)},
  94.     Map58  = {teleport = Vector3.new(-6.01, 146.41, 10.75)},
  95.     Map99  = {teleport = Vector3.new(3.92, 34.37, -144.56)},
  96.     Map153 = {teleport = Vector3.new(137.19, 193.97, -38.58)},
  97.     Map115 = {teleport = Vector3.new(-1.70, 150.65, 4.80)},
  98.     Map126 = {teleport = Vector3.new(10.22, 76.77, 255.49)},
  99.     Map142 = {teleport = Vector3.new(-3.73, 299.66, -17.49)},
  100.     Map85  = {teleport = Vector3.new(-1.63, 146.41, 14.96)},
  101.     Map98  = {},
  102.     Map54  = {teleport = Vector3.new(11.17, 34.06, -1.55)},
  103.     Map138 = {teleport = Vector3.new(-0.36, 146.11, 18.32)},
  104.     Map75  = {teleport = Vector3.new(2.32, 76.08, -132.25)},
  105.     Map140 = {teleport = Vector3.new(7.81, 62.29, 163.07)},
  106.     Map12  = {teleport = Vector3.new(1.43, 153.30, -1.88)},
  107.     Map19  = {teleport = Vector3.new(-19.86, 144.25, -87.17)},
  108.     Map131 = {teleport = Vector3.new(-1.04, 146.41, 13.19)},
  109.     Map91  = {teleport = {Vector3.new(2.20, -65.26, -113.42), Vector3.new(4.65, -55.72, 46.65)}},
  110.     Map107 = {teleport = Vector3.new(-69.71, 180.15, -70.48)},
  111.     Map81  = {teleport = Vector3.new(-9.74, 58.73, -301.90)},
  112.     Map132 = {teleport = Vector3.new(1.86, 146.41, 18.27)}
  113. }
  114.  
  115. local function teleport(cf)
  116.     if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  117.         player.Character.HumanoidRootPart.CFrame = CFrame.new(cf)
  118.     end
  119. end
  120.  
  121. RunService.RenderStepped:Connect(function()
  122.     if lastHRPPos and enabled then
  123.         teleport(lastHRPPos.Position)
  124.     end
  125. end)
  126.  
  127. Workspace.ChildAdded:Connect(function(map)
  128.     if not enabled then return end
  129.     local data = mapSettings[map.Name]
  130.     if not data then return end
  131.  
  132.     if data.teleport then
  133.         if typeof(data.teleport) == "table" then
  134.             for _,p in ipairs(data.teleport) do
  135.                 teleport(p)
  136.                 task.wait(0.2)
  137.             end
  138.         else
  139.             teleport(data.teleport)
  140.         end
  141.     elseif data.freeze then
  142.         lastHRPPos = player.Character.HumanoidRootPart.CFrame
  143.     end
  144.  
  145.     if map.Name == "Map98" then
  146.         for _,obj in ipairs(map:GetDescendants()) do
  147.             if obj:IsA("BasePart") and obj.Name == "Block" then
  148.                 teleport(obj.Position + Vector3.new(0,3,0))
  149.                 task.wait(0.1)
  150.             end
  151.         end
  152.     end
  153. end)
  154.  
  155. btnMap.MouseButton1Click:Connect(function()
  156.     enabled = not enabled
  157.     lastHRPPos = nil
  158.     btnMap.Text = "AutoPlay 40+ Game : " .. (enabled and "ON" or "OFF")
  159.     btnMap.BackgroundColor3 = enabled and Color3.fromRGB(200,50,50) or Color3.fromRGB(0,170,0)
  160. end)
  161.  
  162. local coinEnabled = false
  163.  
  164. task.spawn(function()
  165.     while true do
  166.         if coinEnabled then
  167.             local char = player.Character
  168.             local hrp = char and char:FindFirstChild("HumanoidRootPart")
  169.             if hrp then
  170.                 for _,c in ipairs(Workspace:GetDescendants()) do
  171.                     if c:IsA("BasePart") and c.Name == "Coin" and coinEnabled then
  172.                         hrp.CFrame = CFrame.new(c.Position + Vector3.new(0,3,0))
  173.                         task.wait(0.15)
  174.                     end
  175.                 end
  176.             end
  177.         end
  178.         task.wait(0.15)
  179.     end
  180. end)
  181.  
  182. btnCoin.MouseButton1Click:Connect(function()
  183.     coinEnabled = not coinEnabled
  184.     btnCoin.Text = "Auto Coin Farm : " .. (coinEnabled and "ON" or "OFF")
  185.     btnCoin.BackgroundColor3 = coinEnabled and Color3.fromRGB(200,50,50) or Color3.fromRGB(0,170,0)
  186. end)
Advertisement
Add Comment
Please, Sign In to add comment