Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- item spawn bypass --
- _G.itemHook = _G.itemHook or hookmetamethod(game, '__newindex', function(self, key, val)
- if self.Name == 'ItemSpawn' and key == 'OnClientInvoke' then
- _G.spawnFunc = val
- _G.funcReturn = getconstants(val)[3]
- print('item hack loaded')
- u1 = {}
- funcfor = function(arg1, list)
- if not u1[list.CD] then
- u1[list.CD] = true
- --print('Item added',list.Replica)
- local clon = list.Replica:Clone()
- clon.Parent = game:GetService("Workspace")["Item_Spawns"].Items
- clon.Base.CFrame = list.CFrame
- list.CD.Parent = clon
- local v30 = list.CD:Clone()
- v30.Enabled = true
- v30.Parent = clon
- v30.Name = 'RightPrompt'
- u8 = {}
- u8[1] = v30.Triggered:Connect(function(p2)
- list.CD.RemoteEvent:FireServer()
- end)
- local function v31()
- if not u1[list.CD] then
- return
- end
- u1[list.CD] = nil
- if clon then
- clon:Destroy()
- end
- if list.CD then
- list.CD:Destroy()
- end
- end
- u8[2] = clon.ChildRemoved:Connect(function(p3)
- if p3 == list.CD or not list.CD or not list.CD.Parent then
- v31();
- end;
- end)
- end
- return _G.funcReturn
- end
- return _G.itemHook(self, key, funcfor)
- end
- return _G.itemHook(self, key, val)
- end)
- -- Loading skip --
- while not game:IsLoaded() do wait() end
- while true do
- for i,v in pairs(game:GetService("Players").LocalPlayer:WaitForChild('PlayerGui'):GetDescendants()) do
- if v.Name == 'TextButton' and v.Parent.Name == 'Skip' then
- loading = v
- end
- end
- if loading then break end
- end
- while #getconnections(loading.MouseButton1Click) == 0 do wait() end
- for i,v in pairs(getconnections(loading.MouseButton1Click)) do v.Function() end
- while true do
- for i,v in pairs(game:GetService("Players").LocalPlayer:WaitForChild('PlayerGui'):GetDescendants()) do
- if v.Name == 'Play' and v.Parent.Name == 'LoadingScreen' then
- playbtn = v
- end
- end
- if playbtn then break end
- end
- while #getconnections(playbtn.MouseButton1Click) == 0 do wait() end
- for i,v in pairs(getconnections(playbtn.MouseButton1Click)) do v.Function() end
- -- Constants --
- lplr = game.Players.LocalPlayer
- _G.ayb = _G.ayb and _G.ayb + 1 or 1
- session = _G.ayb
- itemsCountInBackpack = {
- ["Mysterious Bow"] = 10,
- ["Gold Coin"] = 45,
- ["Pure Rokakaka"] = 10,
- ["Bottle of Blood"] = 3,
- ["Quinton's Glove"] = 10,
- ["Stone Mask"] = 10,
- ["Mysterious Arrow"] = 25,
- ["Rib Cage of The Saint's Corpse"] = 10,
- ["Steel Ball"] = 10,
- ["Dio's Diary"] = 10,
- ["Ancient Scroll"] = 10,
- ["Zepellin's Headband"] = 10,
- ["Left Arm of The Saint's Corpse"] = 10,
- ["Dio's Bone"] = 10,
- ["Lucky Arrow"] = 10,
- ["Diamond"] = 30,
- ["Rokakaka"] = 25,
- ["Red Candy"] = 40,
- ["Blue Candy"] = 40,
- ["Green Candy"] = 40,
- ["Yellow Candy"] = 40,
- ["Christmas Present"] = 10,
- }
- -- Functions --
- function checkItem(item)
- for _,object in pairs(item:GetChildren()) do
- if object:IsA('BasePart') and object.Transparency < 1 then
- return object
- end
- end
- return false
- end
- function takeItem(item)
- game:GetService("Players").LocalPlayer.Character.RemoteEvent:FireServer("InputBegan", {["Input"] = Enum.KeyCode.E})
- wait(0.2)
- for _,object in pairs(item:GetChildren()) do
- if object.ClassName == 'ProximityPrompt' and object.Enabled then
- fireproximityprompt(object, 0)
- return
- end
- end
- game:GetService("Players").LocalPlayer.Character.RemoteEvent:FireServer("InputEnded", {["Input"] = Enum.KeyCode.E})
- end
- function countItems()
- local items = {}
- for i,v in pairs(lplr.Backpack:GetChildren()) do
- items[v.Name] = items[v.Name] and items[v.Name] + 1 or 1
- end
- setmetatable(items, {__index = function() return 0 end})
- return items
- end
- function serverHop()
- placeId = game.PlaceId
- function findTeleport()
- local nextCursor;
- while true do
- if nextCursor == 'end' then
- break
- elseif not nextCursor then
- nextCursor = ''
- end
- print('Finding server...')
- url = 'https://games.roblox.com/v1/games/'..tostring(placeId)..'/servers/Public?sortOrder=Desc&excludeFullGames=true&limit=100&cursor='..nextCursor
- local request = game:HttpGet(url)
- local jsonDecode = game:GetService("HttpService"):JSONDecode(request)
- nextCursor = jsonDecode.nextPageCursor
- if not nextCursor then
- nextCursor = 'end'
- end
- local data = jsonDecode.data
- for i,v in pairs(data) do
- if not oldServers[v.id] then
- serverId = v.id
- end
- end
- if serverId then
- print('New server: '..serverId)
- game:GetService('TeleportService'):TeleportToPlaceInstance(placeId, serverId, game.Players.LocalPlayer, nil, oldServers)
- break
- end
- end
- end
- oldServers = game:GetService('TeleportService'):GetLocalPlayerTeleportData() or {}
- oldServers[game.JobId] = true
- findTeleport()
- if not serverId then
- oldServers = {[game.JobId] = true}
- findTeleport()
- end
- if not serverId then
- oldServers = {}
- findTeleport()
- end
- end
- -- Tp Bypass --
- _G.old = _G.old or hookmetamethod(game,"__namecall", function(self,...)
- local args = {...}
- local method = getnamecallmethod()
- if tostring(self) == "Returner" and tostring(method) == "InvokeServer" then
- return " ___XP DE KEY"
- end
- return _G.old(self, ...)
- end)
- -- Main --
- spawn(function()
- inServer = true
- wait(inf)
- while wait() do
- local itemsCheck = false
- for _,item in pairs(game.Workspace.Item_Spawns.Items:GetChildren()) do
- if itemsForFarm[item.Name] then
- itemsCheck = true
- end
- end
- if not itemsCheck then
- break
- end
- end
- inServer = false
- end)
- while wait() and inServer and session == _G.ayb do
- for _,item in pairs(game.Workspace.Item_Spawns.Items:GetChildren()) do
- if itemsForFarm[item.Name] and countItems()[item.Name] < itemsCountInBackpack[item.Name] then
- local object = checkItem(item)
- if object and session == _G.ayb then
- lplr.Character.HumanoidRootPart.CFrame = object.CFrame
- wait(0.8)
- takeItem(item)
- wait(0.8)
- end
- end
- end
- end
- if session == _G.ayb then
- serverHop()
- end
- end -- for placeid check
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement