Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not getrawmetatable or not setreadonly or not newcclosure then
- game:GetService"Players".LocalPlayer:Kick("Incompatible exploit")
- end
- _G.maxhp = 500
- _G.wait = .5
- --don't touch below unless ur sure what ur doing
- local lp = game:GetService"Players".LocalPlayer
- local uis = game:GetService"UserInputService"
- local on = false
- local a = 1
- local key
- local mt = getrawmetatable(game)
- setreadonly(mt,false)
- local oldN = mt.__namecall
- mt.__namecall = newcclosure(function(...)
- if key then return oldN(...) end
- local args = {...}
- if getnamecallmethod() == "InvokeServer" and string.find(args[1].Name,"join") then
- key = tostring(args[2][1][2][1])
- game:GetService"StarterGui":SetCore("SendNotification", {
- Title = "Farm",
- Text = "Grabbed key"
- })
- end
- return oldN(...)
- end)
- setreadonly(mt,true)
- game:GetService"StarterGui":SetCore("SendNotification", {
- Title = "PS Farm by Ryyb",
- Text = "F5 to toggle"
- })
- uis.InputBegan:Connect(function(input,gP)
- if gP then return end
- if input.KeyCode == Enum.KeyCode.F5 then
- if key then
- on = not on
- game:GetService"StarterGui":SetCore("SendNotification", {
- Title = "PS Farm by Ryyb",
- Text = tostring(on)
- })
- else
- game:GetService"StarterGui":SetCore("SendNotification", {
- Title = "PS Farm by Ryyb",
- Text = "Click on a coin".."\n".."to grab key"
- })
- end
- end
- end)
- local function farm(v)
- if not on or not v or not v:FindFirstChild"POS" then return end
- lp.Character:FindFirstChild"HumanoidRootPart".CFrame = v.POS.CFrame+Vector3.new(0,-7.5,0)
- workspace.__THINGS.__REMOTES["join coin"]:InvokeServer({{v.Name,key},{false,false}})
- workspace.__THINGS.__REMOTES["change pet target"]:FireServer({{key,"Coin",v.Name},{false,false,false}})
- workspace.__THINGS.__REMOTES["farm coin"]:FireServer({{v.Name,key},{false,false}})
- for _,v in pairs(workspace.__THINGS.Drops:GetChildren()) do
- workspace.__THINGS.__REMOTES["take drop"]:FireServer({{v.Name,"id"..a},{false,false}})
- end
- end
- game:GetService"RunService".RenderStepped:Connect(function()
- if not on or not key then return end
- if not lp.Character or not lp.Character:FindFirstChildOfClass"Humanoid" then return end
- lp.Character:FindFirstChildOfClass"Humanoid":ChangeState(11)
- a = a + 1
- if a >= 10 then
- a = 1
- end
- for _,v in pairs(workspace.__THINGS.Coins:GetChildren()) do
- if v:FindFirstChild"POS" and v:FindFirstChild"Settings" and v.Settings.Health.Value > 0 and v.Settings.Health.Value < _G.maxhp then
- repeat wait(_G.wait) farm(v) until not v or not on or not lp.Character
- end
- end
- end)
Add Comment
Please, Sign In to add comment