
Keyless

local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local LP = Players.LocalPlayer
local RS = game:GetService("RunService")
local CHEST_SEARCH_TERMS = {"presentchest", "chest"}
local HOMING_ITEMS = {
"present1",
"present2",
"present3",
"tix"
}
local HomingEnabled = false
local HomingConnection = nil
local function GetRoot()
local Char = LP.Character
if not Char or not Char.Parent then Char = LP.CharacterAdded:Wait() end
return Char:FindFirstChild("HumanoidRootPart")
end
local function GetTeleportPosition(Model)
if not Model then return nil end
local TPV = nil
pcall(function() TPV = Model:GetPivot() * CFrame.new(0, 5, 0) end)
if not TPV and Model.PrimaryPart then
TPV = Model.PrimaryPart.CFrame * CFrame.new(0, 5, 0)
end
if not TPV then
pcall(function()
local Bounds = Model:GetBoundingBox()
TPV = Bounds.CFrame * CFrame.new(0, 5, 0)
end)
end
return TPV
end
local function DoTeleport(TargetModel)
local HR = GetRoot()
if not HR or not TargetModel then return end
local TPV = GetTeleportPosition(TargetModel)
if TPV then
pcall(function() HR.CFrame = TPV end)
end
end
local function FindTeleportTarget()
local Descendants = Workspace:GetDescendants()
for _, SearchTerm in ipairs(CHEST_SEARCH_TERMS) do
local LowerSearch = SearchTerm:lower()
for _, Descendant in ipairs(Descendants) do
-- Use string.find for case-insensitive and partial match
if Descendant.Name:lower():find(LowerSearch) then
return Descendant
end
end
end
return nil
end
local function HomingLoop()
local HR = GetRoot()
if not HR then
task.wait(0.5)
return
end
local TargetPosition = HR.CFrame.Position
local WorkspaceChildren = Workspace:GetDescendants()
for _, ItemName in ipairs(HOMING_ITEMS) do
local LowerItemName = ItemName:lower()
for _, Descendant in ipairs(WorkspaceChildren) do
if Descendant.Name:lower():find(LowerItemName) then
pcall(function()
if Descendant:IsA("Model") then
local Primary = Descendant.PrimaryPart
if Primary and not Primary.Anchored then
Descendant:SetPrimaryPartCFrame(CFrame.new(TargetPosition))
end
elseif Descendant:IsA("BasePart") then
if not Descendant.Anchored then
-- Simple position setting
Descendant.Position = TargetPosition
end
end
end)
end
end
end
task.wait(0.05)
end
local Gui = Instance.new("ScreenGui")
Gui.Name = "UtilityGUI"
Gui.ResetOnSpawn = false
Gui.Parent = LP.PlayerGui
local F = Instance.new("Frame")
F.Size = UDim2.fromScale(0.2, 0.2)
F.Position = UDim2.fromScale(0.85, 0.05)
F.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
F.BorderSizePixel = 0
F.Active = true
F.Draggable = true
F.Parent = Gui
Instance.new("UICorner", F).CornerRadius = UDim.new(0, 8)
local UL = Instance.new("UIListLayout", F)
UL.Padding = UDim.new(0, 5)
UL.HorizontalAlignment = Enum.HorizontalAlignment.Center
UL.VerticalAlignment = Enum.VerticalAlignment.Top
UL.FillDirection = Enum.FillDirection.Vertical
UL.SortOrder = Enum.SortOrder.LayoutOrder
local TPBtn = Instance.new("TextButton", F)
TPBtn.LayoutOrder = 1
TPBtn.Size = UDim2.fromScale(0.9, 0.45)
TPBtn.Text = "TELEPORT TO PRESENT CHEST"
TPBtn.Font = Enum.Font.GothamBold
TPBtn.TextScaled = true
TPBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
TPBtn.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
TPBtn.BorderSizePixel = 0
Instance.new("UICorner", TPBtn).CornerRadius = UDim.new(0, 5)
TPBtn.MouseButton1Click:Connect(function()
local Target = FindTeleportTarget()
if Target then
DoTeleport(Target)
else
warn("Present Chest not found!")
end
end)
local HomingBtn = Instance.new("TextButton", F)
HomingBtn.LayoutOrder = 2
HomingBtn.Size = UDim2.fromScale(0.9, 0.45)
HomingBtn.Text = "COLLECT ALL: OFF"
HomingBtn.Font = Enum.Font.GothamBold
HomingBtn.TextScaled = true
HomingBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
HomingBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
HomingBtn.BorderSizePixel = 0
Instance.new("UICorner", HomingBtn).CornerRadius = UDim.new(0, 5)
local function ToggleHoming()
HomingEnabled = not HomingEnabled
if HomingEnabled then
HomingBtn.Text = "COLLECT ALL: ON"
HomingBtn.BackgroundColor3 = Color3.fromRGB(255, 0, 100)
-- Changed to Heartbeat for wider compatibility and stable FPS
HomingConnection = RS.Heartbeat:Connect(HomingLoop)
else
HomingBtn.Text = "COLLECT ALL: OFF"
HomingBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
if HomingConnection then
HomingConnection:Disconnect()
HomingConnection = nil
end
end
end
HomingBtn.MouseButton1Click:Connect(ToggleHoming)No comments yet for this script.