Run it
Copy the script and paste it into your executor.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local plr = Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Parent = plr.PlayerGui
button = .()
button.Size = .(, , , )
button.Position = .(, , , )
button.BackgroundColor3 = .(, , )
button.TextColor3 = .(, , )
button.Text =
button.Font = .Font.GothamBold
button.TextSize =
button.Parent = screenGui
corner = .()
corner.CornerRadius = .(, )
corner.Parent = button
autoCollecting =
connection
()
connection = RunService.Heartbeat:(()
coin = :()
coin
coinPos = coin.Position
myPos = rootPart.Position
dist = (coinPos - myPos).Magnitude
dist >
direction = (coinPos - myPos).Unit
rootPart.CFrame = rootPart.CFrame + direction *
direction = (myPos - coinPos).Unit
rootPart.CFrame = rootPart.CFrame + direction *
)
()
connection
connection:()
connection =
button.MouseButton1Click:(()
autoCollecting = autoCollecting
autoCollecting
button.BackgroundColor3 = .(, , )
button.Text =
()
button.BackgroundColor3 = .(, , )
button.Text =
()
)
plr.CharacterAdded:((newChar)
character = newChar
rootPart = newChar:()
autoCollecting
()
()
)-stay close enough to the coin(almost touching) and then,turn on