IvesAwadi

Saber Sim(NOT WORKING)

Apr 13th, 2020
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. --Globals variables And Arguments
  2. local RS = game.ReplicatedStorage
  3. local events = RS.Events
  4. local player = game.Players.LocalPlayer
  5. --Check
  6. function check(p, i)
  7. if p:FindFirstChild(i) then
  8. return true
  9. else
  10. return false
  11. end
  12. end
  13. --Delete Pet thing
  14. function petdel(pet)
  15. events.PetCommand:FireServer(pet.Name, "Delete")
  16. end
  17.  
  18. --Main script to fix(Game uses id to sell the pets btw)
  19. if check(player, "PlayerGui") and check(player.PlayerGui, "Gui") and check(player.PlayerGui.Gui, "Submenus") and check(player.PlayerGui.Gui.Submenus, "PetsInventory") and check(player.PlayerGui.Gui.Submenus.PetsInventory, "PetsFrame") and check(player.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame, "Frame") then
  20. for i,v in pairs(player.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame.Frame:GetChildren()) do
  21. if v:IsA("ImageButton") and check(v, "IMG") and v.IMG.Parent.Name then
  22. local PLR_PET = v.IMG:FindFirstChildOfClass("ViewportFrame").Name
  23. if RS.Pets:FindFirstChild(PLR_PET) then
  24. if RS.Pets[PLR_PET].Rarity.Value == "1" then
  25. petdel(v)
  26. end
  27. end
  28. end
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment