karobloxYT

test wewe

Dec 2nd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. if not getrawmetatable or not setreadonly or not newcclosure then
  2. game:GetService"Players".LocalPlayer:Kick("Incompatible exploit")
  3. end
  4.  
  5. _G.maxhp = 500
  6. _G.wait = .5
  7.  
  8. --don't touch below unless ur sure what ur doing
  9.  
  10. local lp = game:GetService"Players".LocalPlayer
  11. local uis = game:GetService"UserInputService"
  12.  
  13. local on = false
  14. local a = 1
  15. local key
  16.  
  17. local mt = getrawmetatable(game)
  18. setreadonly(mt,false)
  19. local oldN = mt.__namecall
  20.  
  21. mt.__namecall = newcclosure(function(...)
  22. if key then return oldN(...) end
  23. local args = {...}
  24.  
  25. if getnamecallmethod() == "InvokeServer" and string.find(args[1].Name,"join") then
  26. key = tostring(args[2][1][2][1])
  27. game:GetService"StarterGui":SetCore("SendNotification", {
  28. Title = "Farm",
  29. Text = "Grabbed key"
  30. })
  31. end
  32.  
  33. return oldN(...)
  34. end)
  35.  
  36. setreadonly(mt,true)
  37.  
  38. game:GetService"StarterGui":SetCore("SendNotification", {
  39. Title = "PS Farm by Ryyb",
  40. Text = "F5 to toggle"
  41. })
  42.  
  43. uis.InputBegan:Connect(function(input,gP)
  44. if gP then return end
  45.  
  46. if input.KeyCode == Enum.KeyCode.F5 then
  47. if key then
  48. on = not on
  49. game:GetService"StarterGui":SetCore("SendNotification", {
  50. Title = "PS Farm by Ryyb",
  51. Text = tostring(on)
  52. })
  53. else
  54. game:GetService"StarterGui":SetCore("SendNotification", {
  55. Title = "PS Farm by Ryyb",
  56. Text = "Click on a coin".."\n".."to grab key"
  57. })
  58. end
  59. end
  60. end)
  61.  
  62. local function farm(v)
  63. if not on or not v or not v:FindFirstChild"POS" then return end
  64.  
  65. lp.Character:FindFirstChild"HumanoidRootPart".CFrame = v.POS.CFrame+Vector3.new(0,-7.5,0)
  66. workspace.__THINGS.__REMOTES["join coin"]:InvokeServer({{v.Name,key},{false,false}})
  67. workspace.__THINGS.__REMOTES["change pet target"]:FireServer({{key,"Coin",v.Name},{false,false,false}})
  68. workspace.__THINGS.__REMOTES["farm coin"]:FireServer({{v.Name,key},{false,false}})
  69.  
  70. for _,v in pairs(workspace.__THINGS.Drops:GetChildren()) do
  71. workspace.__THINGS.__REMOTES["take drop"]:FireServer({{v.Name,"id"..a},{false,false}})
  72. end
  73. end
  74.  
  75. game:GetService"RunService".RenderStepped:Connect(function()
  76. if not on or not key then return end
  77. if not lp.Character or not lp.Character:FindFirstChildOfClass"Humanoid" then return end
  78.  
  79. lp.Character:FindFirstChildOfClass"Humanoid":ChangeState(11)
  80.  
  81. a = a + 1
  82.  
  83. if a >= 10 then
  84. a = 1
  85. end
  86.  
  87. for _,v in pairs(workspace.__THINGS.Coins:GetChildren()) do
  88. if v:FindFirstChild"POS" and v:FindFirstChild"Settings" and v.Settings.Health.Value > 0 and v.Settings.Health.Value < _G.maxhp then
  89. repeat wait(_G.wait) farm(v) until not v or not on or not lp.Character
  90. end
  91. end
  92. end)
Add Comment
Please, Sign In to add comment