[go: up one dir, main page]

0% found this document useful (0 votes)
153 views2 pages

Cash Generator Open Source and Keyless

The document is a Lua script designed for a Roblox game that automates the process of locating and teleporting to chests in the game world. It includes functions for sorting chests by distance from the player, toggling noclip to pass through objects, and teleporting to the nearest chest at a specified speed. The script continuously runs in a loop to find and teleport to chests until none are available.

Uploaded by

bcqp9nnzpb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views2 pages

Cash Generator Open Source and Keyless

The document is a Lua script designed for a Roblox game that automates the process of locating and teleporting to chests in the game world. It includes functions for sorting chests by distance from the player, toggling noclip to pass through objects, and teleporting to the nearest chest at a specified speed. The script continuously runs in a loop to find and teleport to chests until none are available.

Uploaded by

bcqp9nnzpb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

local MaxSpeed = 300 -- Studs per second 380 no flag but kick

local LocalPlayer = game:GetService("Players").LocalPlayer


local Locations = workspace._WorldOrigin.Locations

local function getCharacter()


if not LocalPlayer.Character then
LocalPlayer.CharacterAdded:Wait()
end
LocalPlayer.Character:WaitForChild("HumanoidRootPart")
return LocalPlayer.Character
end

local function DistanceFromPlrSort(ObjectList: table)


local RootPart = getCharacter().LowerTorso
table.sort(ObjectList, function(ChestA, ChestB)
local RootPos = RootPart.Position
local DistanceA = (RootPos - ChestA.Position).Magnitude
local DistanceB = (RootPos - ChestB.Position).Magnitude
return DistanceA < DistanceB
end)
end

local UncheckedChests = {}
local FirstRun = true

local function getChestsSorted()


if FirstRun then
FirstRun = false
local Objects = game:GetDescendants()
for i, Object in pairs(Objects) do
if Object.Name:find("Chest") and Object.ClassName == "Part" then
table.insert(UncheckedChests, Object)
end
end
end
local Chests = {}
for i, Chest in pairs(UncheckedChests) do
if Chest:FindFirstChild("TouchInterest") then
table.insert(Chests, Chest)
end
end
DistanceFromPlrSort(Chests)
return Chests
end

local function toggleNoclip(Toggle: boolean)


for i,v in pairs(getCharacter():GetChildren()) do
if v.ClassName == "Part" then
v.CanCollide = not Toggle
end
end
end

local function Teleport(Goal: CFrame, Speed)


if not Speed then
Speed = MaxSpeed
end
toggleNoclip(true)
local RootPart = getCharacter().HumanoidRootPart
local Magnitude = (RootPart.Position - Goal.Position).Magnitude

RootPart.CFrame = RootPart.CFrame

while not (Magnitude < 1) do


local Direction = (Goal.Position - RootPart.Position).unit
RootPart.CFrame = RootPart.CFrame + Direction * (Speed * wait())
Magnitude = (RootPart.Position - Goal.Position).Magnitude
end
toggleNoclip(false)
end

local function main()


while wait() do
local Chests = getChestsSorted()
if #Chests > 0 then
Teleport(Chests[1].CFrame)
else
-- You can put serverhop here
end
end
end

wait = task.wait
main()

You might also like