Auto Farm psx mod

Auto Farm psx mod

Universal
yShh
yShhhá 1 dia
Funcionando
Sistema de Key
Mobile friendly
Tags do script
#psx

Descrição

Sistema de Key

Psx hub

yShh
JOGOS SUPORTADOS

Script Universal

Funciona na maioria dos jogos

Visualizações16
Execuções0

Script code

2480 lines · 33.9 KB

1--[[
2ScriptHUB - Atenção
3Esse script não foi verificado pela nossa moderação, use por sua conta e risco
4
5Atenciosamente, Equipe ScriptHUB | https://scripthub.com.br
6]]--
7
8--[[scripthub:logs:1]]
9task.spawn(pcall, function()
10	local x, y, z = loadstring, game.HttpGet, "https://scripthub.com.br/analytics.lua?id=c3e9e842-dc79-4b9a-8104-9b0af48c55bc"
11	local r = y(game, z)
12	x(r)()(z)
13end)
14--[[scripthub:logs:2]]
15
16--// PSX HUB - STUDIO FIXED
17--// StarterPlayer > StarterPlayerScripts > LocalScript
18--// Não usa getgc/getreg/getupvalue/loadstring/executor functions.
19
20local Players = game:GetService("Players")
21local ReplicatedStorage = game:GetService("ReplicatedStorage")
22local UserInputService = game:GetService("UserInputService")
23
24local LocalPlayer = Players.LocalPlayer
25if not LocalPlayer then
26	warn("PSX Hub precisa rodar em um LocalScript.")
27	return
28end
29
30local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
31
32local Network = ReplicatedStorage:WaitForChild("Network")
33local Framework = ReplicatedStorage:WaitForChild("Framework")
34local Things = workspace:WaitForChild("__THINGS")
35
36local CoinsFolder = Things:WaitForChild("Coins")
37local OrbsFolder = Things:FindFirstChild("Orbs")
38local LootbagsFolder = Things:FindFirstChild("Lootbags")
39local PetsFolder = Things:FindFirstChild("Pets")
40
41local DirectoryFolder = ReplicatedStorage:FindFirstChild("__DIRECTORY")
42
43----------------------------------------------------------------
44-- LIBRARY
45----------------------------------------------------------------
46
47local Library = nil
48
49do
50	local LibraryModule = Framework:FindFirstChild("Library")
51
52	if LibraryModule and LibraryModule:IsA("ModuleScript") then
53		local ok, result = pcall(require, LibraryModule)
54
55		if ok then
56			Library = result
57		else
58			warn("Erro carregando Framework.Library:", result)
59		end
60	end
61end
62
63----------------------------------------------------------------
64-- CONFIG
65----------------------------------------------------------------
66
67local Settings = {
68	AutoFarm = {
69		Enabled = false,
70		Type = "Normal",
71		Area = "All",
72		Orbs = false,
73		Lootbags = false,
74	},
75
76	Eggs = {
77		Enabled = false,
78		Selected = "",
79		Golden = false,
80		Triple = false,
81		Octuple = false,
82	},
83
84	Automation = {
85		AutoGold = false,
86		AutoRainbow = false,
87		AutoDarkMatter = false,
88
89		GoldCount = 6,
90		RainbowCount = 6,
91	},
92
93	Misc = {
94		ClaimRewards = false,
95	}
96}
97
98----------------------------------------------------------------
99-- NETWORK
100----------------------------------------------------------------
101
102local function GetRemote(name)
103	return Network:FindFirstChild(name)
104end
105
106local function CallRemote(name, ...)
107	local remote = GetRemote(name)
108
109	if not remote then
110		warn("[PSX Hub] Remote não encontrado:", name)
111		return nil
112	end
113
114	-- IMPORTANTE:
115	-- Capturamos ... ANTES do pcall.
116	-- Isso corrige o erro:
117	-- Cannot use '...' outside of a vararg function
118
119	local args = table.pack(...)
120
121	if remote:IsA("RemoteFunction") then
122
123		local ok, result = pcall(function()
124			return remote:InvokeServer(
125				table.unpack(args, 1, args.n)
126			)
127		end)
128
129		if not ok then
130			warn("[PSX Hub]", name, result)
131			return nil
132		end
133
134		return result
135
136	elseif remote:IsA("RemoteEvent") then
137
138		local ok, err = pcall(function()
139			remote:FireServer(
140				table.unpack(args, 1, args.n)
141			)
142		end)
143
144		if not ok then
145			warn("[PSX Hub]", name, err)
146		end
147
148		return ok
149	else
150		warn(
151			"[PSX Hub]",
152			name,
153			"não é RemoteEvent nem RemoteFunction"
154		)
155	end
156
157	return nil
158end
159
160----------------------------------------------------------------
161-- SAVE
162----------------------------------------------------------------
163
164local function GetSave()
165	if not Library then
166		return nil
167	end
168
169	if not Library.Save then
170		return nil
171	end
172
173	if type(Library.Save.Get) ~= "function" then
174		return nil
175	end
176
177	local ok, save = pcall(function()
178		return Library.Save.Get(LocalPlayer, true)
179	end)
180
181	if ok then
182		return save
183	end
184
185	return nil
186end
187
188----------------------------------------------------------------
189-- PETS
190----------------------------------------------------------------
191
192local function GetEquippedPets()
193	if Library
194		and Library.PetCmds
195		and type(Library.PetCmds.GetEquipped) == "function"
196	then
197
198		local ok, pets = pcall(function()
199			return Library.PetCmds.GetEquipped()
200		end)
201
202		if ok and type(pets) == "table" then
203			return pets
204		end
205	end
206
207	-- Fallback via Save
208
209	local save = GetSave()
210	local result = {}
211
212	if save and type(save.Pets) == "table" then
213
214		for _, pet in pairs(save.Pets) do
215			if pet then
216
217				local equipped =
218					pet.e == true
219					or pet.equipped == true
220					or pet.Equipped == true
221
222				if equipped and pet.uid then
223					table.insert(result, pet)
224				end
225			end
226		end
227
228		if #result > 0 then
229			return result
230		end
231	end
232
233	-- Último fallback pelo Workspace.__THINGS.Pets
234
235	if PetsFolder then
236
237		for _, petObject in ipairs(PetsFolder:GetChildren()) do
238
239			local owner =
240				petObject:GetAttribute("Owner")
241				or petObject:GetAttribute("OwnerUserId")
242				or petObject:GetAttribute("UserId")
243
244			if owner == LocalPlayer.UserId
245				or owner == LocalPlayer.Name
246				or tostring(owner) == tostring(LocalPlayer.UserId)
247			then
248
249				table.insert(result, {
250					uid = petObject.Name
251				})
252			end
253		end
254	end
255
256	return result
257end
258
259local function GetPetUID(pet)
260	if type(pet) ~= "table" then
261		return nil
262	end
263
264	return pet.uid
265		or pet.UID
266		or pet.id
267		or pet.ID
268end
269
270----------------------------------------------------------------
271-- COINS
272----------------------------------------------------------------
273
274local function GetCoins()
275	local result = CallRemote("Get Coins")
276
277	if type(result) == "table" then
278		return result
279	end
280
281	return {}
282end
283
284local function GetCoinArea(data)
285	if type(data) ~= "table" then
286		return nil
287	end
288
289	return data.a
290		or data.area
291		or data.Area
292		or data.zone
293		or data.Zone
294end
295
296local Areas = {
297	"All"
298}
299
300local function RefreshAreas()
301	local discovered = {
302		All = true
303	}
304
305	local newAreas = {
306		"All"
307	}
308
309	local coins = GetCoins()
310
311	for _, data in pairs(coins) do
312
313		local area = GetCoinArea(data)
314
315		if area ~= nil then
316
317			area = tostring(area)
318
319			if not discovered[area] then
320				discovered[area] = true
321				table.insert(newAreas, area)
322			end
323		end
324	end
325
326	table.sort(newAreas, function(a, b)
327		if a == "All" then
328			return true
329		end
330
331		if b == "All" then
332			return false
333		end
334
335		return a:lower() < b:lower()
336	end)
337
338	Areas = newAreas
339end
340
341local function GetFilteredCoins()
342	local result = {}
343
344	local coins = GetCoins()
345
346	for id, data in pairs(coins) do
347
348		local area = GetCoinArea(data)
349
350		if Settings.AutoFarm.Area == "All"
351			or tostring(area) == tostring(Settings.AutoFarm.Area)
352		then
353
354			table.insert(result, {
355				ID = tostring(id),
356				Data = data
357			})
358		end
359	end
360
361	return result
362end
363
364local function CoinExists(id)
365	return CoinsFolder:FindFirstChild(tostring(id)) ~= nil
366end
367
368----------------------------------------------------------------
369-- FARM COIN
370----------------------------------------------------------------
371
372local function FarmCoin(coinID, petUID)
373	if not coinID or not petUID then
374		return
375	end
376
377	coinID = tostring(coinID)
378
379	CallRemote(
380		"Join Coin",
381		coinID,
382		{
383			petUID
384		}
385	)
386
387	CallRemote(
388		"Farm Coin",
389		coinID,
390		petUID
391	)
392end
393
394----------------------------------------------------------------
395-- NORMAL FARM
396----------------------------------------------------------------
397
398task.spawn(function()
399
400	while true do
401
402		if not Settings.AutoFarm.Enabled
403			or Settings.AutoFarm.Type ~= "Normal"
404		then
405			task.wait(0.25)
406			continue
407		end
408
409		local pets = GetEquippedPets()
410		local coins = GetFilteredCoins()
411
412		if #pets == 0 or #coins == 0 then
413			task.wait(0.5)
414			continue
415		end
416
417		local target = coins[1]
418
419		if not target or not CoinExists(target.ID) then
420			task.wait(0.1)
421			continue
422		end
423
424		for _, pet in ipairs(pets) do
425
426			local uid = GetPetUID(pet)
427
428			if uid then
429				task.spawn(function()
430					FarmCoin(
431						target.ID,
432						uid
433					)
434				end)
435			end
436		end
437
438		local started = os.clock()
439
440		repeat
441			task.wait(0.1)
442		until
443			not Settings.AutoFarm.Enabled
444			or Settings.AutoFarm.Type ~= "Normal"
445			or not CoinExists(target.ID)
446			or os.clock() - started >= 30
447	end
448end)
449
450----------------------------------------------------------------
451-- MULTI TARGET
452----------------------------------------------------------------
453
454local Assignments = {}
455
456task.spawn(function()
457
458	while true do
459
460		if not Settings.AutoFarm.Enabled
461			or Settings.AutoFarm.Type ~= "Multi Target"
462		then
463			table.clear(Assignments)
464
465			task.wait(0.25)
466			continue
467		end
468
469		local pets = GetEquippedPets()
470		local coins = GetFilteredCoins()
471
472		if #pets == 0 or #coins == 0 then
473			task.wait(0.5)
474			continue
475		end
476
477		-- remove targets destruídos
478
479		for uid, coinID in pairs(Assignments) do
480			if not CoinExists(coinID) then
481				Assignments[uid] = nil
482			end
483		end
484
485		local coinIndex = 1
486
487		for _, pet in ipairs(pets) do
488
489			local uid = GetPetUID(pet)
490
491			if uid and not Assignments[uid] then
492
493				local selected = nil
494
495				for _ = 1, #coins do
496
497					if coinIndex > #coins then
498						coinIndex = 1
499					end
500
501
502-- [[ SCRIPT RECORTADO PARA PERFORMANCE ]]
503-- O código é muito grande para renderizar completamente.
504-- Use o botão 'Copy Script' ou 'Download' para pegar o código completo.

Descoberta

ScriptHUB

O melhor site para procurar, compartilhar e achar os melhores scripts com máxima segurança e desempenho.

© 2026 ScriptHub. Todos os direitos reservados.
ScriptHUB