Run it
Copy the script and paste it into your executor.
Players = :()
player = Players.LocalPlayer
playerGui = player:()
virtualInputManager = :()
(()
playerGui:()
playerGui.SvimtysscriptsHavenAutoFarm:()
)
screenGui = .(, playerGui)
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.IgnoreGuiInset =
mainFrame = .(, screenGui)
mainFrame.Size = .(, , , )
mainFrame.Position = .(, , , )
mainFrame.BackgroundColor3 = .(, , )
mainFrame.Active =
mainFrame.Draggable =
mainFrame.Visible =
.(, mainFrame).CornerRadius = .(, )
titleLbl = .(, mainFrame)
titleLbl.Size = .(, , , )
titleLbl.BackgroundTransparency =
titleLbl.TextColor3 = .(, , )
titleLbl.TextSize =
titleLbl.Font = .Font.GothamBold
titleLbl.Text =
(parent, text, yPos, color)
btn = .(, parent)
btn.Size = .(, , , )
btn.Position = .(, , , yPos)
btn.BackgroundColor3 = color
btn.Text = text
btn.TextColor3 = .(, , )
btn.Font = .Font.GothamBold
btn.TextSize =
.(, btn).CornerRadius = .(, )
btn
collectChestBtn = (mainFrame, , , .(, , ))
autofarmBtn = (mainFrame, , , .(, , ))
keyFrame = .(, screenGui)
keyFrame.Size = .(, , , )
keyFrame.Position = .(, -, , -)
keyFrame.BackgroundColor3 = .(, , )
keyFrame.Active =
keyFrame.Draggable =
keyFrame.Visible =
.(, keyFrame).CornerRadius = .(, )
keyTitle = .(, keyFrame)
keyTitle.Size = .(, , , )
keyTitle.Position = .(, , , )
keyTitle.BackgroundTransparency =
keyTitle.TextColor3 = .(, , )
keyTitle.TextSize =
keyTitle.Font = .Font.GothamBold
keyTitle.Text =
keyBox = .(, keyFrame)
keyBox.Size = .(, , , )
keyBox.Position = .(, , , )
keyBox.BackgroundColor3 = .(, , )
keyBox.TextColor3 = .(, , )
keyBox.PlaceholderText =
keyBox.Text =
keyBox.TextSize =
keyBox.Font = .Font.Gotham
.(, keyBox).CornerRadius = .(, )
getKeyBtn = (keyFrame, , , .(, , ))
redeemBtn = (keyFrame, , , .(, , ))
keyUrl =
getKeyBtn.MouseButton1Click:(()
(()
(keyUrl)
)
getKeyBtn.Text =
.()
getKeyBtn.Text =
)
redeemBtn.MouseButton1Click:(()
userKey = keyBox.Text
userKey = userKey:(, )
userKey ==
redeemBtn.BackgroundColor3 = .(, , )
redeemBtn.Text =
.()
redeemBtn.BackgroundColor3 = .(, , )
redeemBtn.Text =
redeemBtn.Text =
.()
userKey == (.(userKey, , ) == #userKey >= )
keyFrame.Visible =
mainFrame.Visible =
redeemBtn.BackgroundColor3 = .(, , )
redeemBtn.Text =
.()
redeemBtn.BackgroundColor3 = .(, , )
redeemBtn.Text =
)
isRunning =
isBusy =
()
char = player.Character
char char:()
root = char.HumanoidRootPart
nearestTarget =
minDist =
_, obj (:())
obj:() obj ~= char obj:()
head = obj:() obj:()
head
dist = (head.Position - root.Position).Magnitude
dist <= minDist
minDist = dist
nearestTarget = {model = obj, head = head}
nearestTarget
()
isBusy
() ~=
isBusy =
(()
char = player.Character
char char:()
root = char.HumanoidRootPart
orig = root.CFrame
targetPart =
maxDist =
_, obj (:())
obj:() obj:()
_, g (obj:())
g:() g:()
_, l (g:())
l:() (l.Text:() l.Text:())
part = obj.PrimaryPart obj:()
part
dist = (part.Position - root.Position).Magnitude
dist < maxDist
maxDist = dist
targetPart = part
targetPart
root.CFrame = targetPart.CFrame * .(, , -)
.()
_, obj (:())
obj:()
_, d (obj:())
(d:() d:())
p = obj.PrimaryPart obj:()
p (p.Position - root.Position).Magnitude <
d:() (d)
d:() (d)
.()
root.CFrame = orig
)
isBusy =
(part)
(()
cam = .CurrentCamera
cam
screenPos, onScreen = cam:(part.Position)
onScreen
virtualInputManager:(screenPos.X, screenPos.Y, , , , )
.()
virtualInputManager:(screenPos.X, screenPos.Y, , , , )
)
()
isBusy
nearestTarget = ()
nearestTarget
isBusy =
(()
char = player.Character
char char:()
root = char.HumanoidRootPart
orig = root.CFrame
root.CFrame = nearestTarget.head.CFrame * .(, , )
.()
_, d (nearestTarget.model:())
d:() (d)
d:() (d)
(nearestTarget.head)
.()
root.CFrame = orig
)
isBusy =
collectChestBtn.MouseButton1Click:(()
()
)
autofarmBtn.MouseButton1Click:(()
isRunning = isRunning
isRunning
autofarmBtn.BackgroundColor3 = .(, , )
autofarmBtn.Text =
autofarmBtn.BackgroundColor3 = .(, , )
autofarmBtn.Text =
)
.(()
isRunning
()
.()
)
.(()
isRunning
()
.()
)Auto farm functional might not work well
Build a Haven