Run it
Copy the script and paste it into your executor.
Players = :()
TweenService = :()
VirtualInputManager = :()
UserInputService = :()
Workspace = :()
plr = Players.LocalPlayer
active =
isDragging =
startDrag, btnStartPos
currentMove =
spawnTimes = {}
screen = .()
screen.Name =
screen.ResetOnSpawn =
screen.Parent = plr:()
button = .()
button.Size = .(, , , )
button.Position = .(, , , )
button.Text =
button.Font = .Font.GothamBold
button.TextColor3 = .(, , )
button.TextScaled =
button.BackgroundColor3 = .(, , )
button.BorderSizePixel =
button.AutoButtonColor =
button.Active =
button.Draggable =
button.Parent = screen
button.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
isDragging =
startDrag = input.Position
btnStartPos = button.Position
conn
conn = input.Changed:(()
input.UserInputState == .UserInputState.End
isDragging =
conn:()
)
)
UserInputService.InputChanged:((input)
isDragging input.UserInputType == .UserInputType.MouseMovement
delta = input.Position - startDrag
button.Position = .(
btnStartPos.X.Scale,
btnStartPos.X.Offset + delta.X,
btnStartPos.Y.Scale,
btnStartPos.Y.Offset + delta.Y
)
)
button.MouseButton1Click:(()
active = active
button.Text = active
button.BackgroundColor3 = active .(, , ) .(, , )
)
()
char = plr.Character
char char:()
root = char.HumanoidRootPart
closest =
minDist =
currentTime = ()
_, obj (Workspace:())
obj.Name ==
spawnTimes[obj]
spawnTimes[obj] = currentTime
currentTime - spawnTimes[obj] >=
part = obj:()
part
dist = (root.Position - part.Position).Magnitude
dist < minDist
minDist = dist
closest = part
treasure = Workspace:()
treasure
chests = treasure:()
chests
_, chest (chests:())
spawnTimes[chest]
spawnTimes[chest] = currentTime
currentTime - spawnTimes[chest] >=
targetPart
chest:()
targetPart = chest:() chest:()
chest:() .(chest.Name, )
targetPart = chest
targetPart
dist = (root.Position - targetPart.Position).Magnitude
dist < minDist
minDist = dist
closest = targetPart
obj, _ (spawnTimes)
obj.Parent
spawnTimes[obj] =
closest
(enabled)
char = plr.Character
char
_, part (char:())
part:()
part.CanCollide = enabled
(()
()
active
char = plr.Character
char char:()
()
VirtualInputManager:(, .KeyCode.E, , )
()
VirtualInputManager:(, .KeyCode.E, , )
()
target = ()
target
currentMove currentMove:()
root = char.HumanoidRootPart
currentMove = TweenService:(root,
TweenInfo.(, .EasingStyle.Quad),
{ = target.CFrame + .(, , )}
)
currentMove:()
currentMove.Completed:()
()
plr.Character
plr.Character:(, )
plr.CharacterAdded:()
()
)
plr.CharacterAdded:((char)
char:(, )
()
active
()
)added auto chest and fixed bugs (idk what next feature add)