Posted
Hey, I've been trying to make a script that gives you money, but I can't seem to make it work. Does anyone here have scripting experience that can help me?
Replied
-- // Fantastic Frontier: Utility Grinder
-- // Focus: Automating resource gathering for Gold
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local LocalPlayer = Players.LocalPlayer
local Config = {
AutoCollect = true,
Target = "Firefly", -- Can be changed to "Ore" or "Plant"
Distance = 50
}
-- Function to find nearby harvestables
local function GetNearbyResource()
local target, closestDist = nil, Config.Distance
-- Fantastic Frontier uses Tags for many world objects
for _, obj in pairs(CollectionService:GetTagged(Config.Target)) do
local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
if root and obj:IsA("BasePart") then
local dist = (obj.Position - root.Position).Magnitude
if dist < closestDist then
target = obj
closestDist = dist
end
end
end
return target
end
-- Main Loop
task.spawn(function()
while task.wait(0.5) do
if Config.AutoCollect then
local res = GetNearbyResource()
if res then
-- Fires the game's interaction remote
-- Note: You may need to use a RemoteSpy to find the exact name
local interact = game:GetService("ReplicatedStorage"):FindFirstChild("InteractRemote")
if interact then
interact:FireServer(res)
end
end
end
end
end)
- FE: Changes only happen on your screen; the server ignores them.
- Validation: The server kicks you if money increases without a verified action (like mining or selling).
Cancel
Post
I Help People, Ask me.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post