qsenko1

Normal Petshop System Prototype lol

Jul 12th, 2021 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.46 KB | None | 0 0
  1. -- The Client side Script Protytipe
  2. local RS = game:GetService("ReplicatedStorage") -- the actual Service in what we have all the Pets,Events stored and etc.
  3. local PetsFolder = RS.Pets
  4. local PetsPurchaseEvent = PetsFolder.PetEvents.PetsPurchase
  5. local HiddenPetEvent = PetsFolder.PetEvents.HiddenPetEvent
  6. local MainFrame = script.Parent -- the frame that we will use to loop and get all objects,("instances") from!!!
  7. local debounce = true -- debounce is not recommended it can be just debounce that means its either true or false but i love setting it to something!!
  8. local player = game:GetService("Players").LocalPlayer -- thats a easy way of getting the local Player
  9. local PetValues = player.PetsFolder.Values:GetDescendants()      --:GetChildren()
  10. local BuyFrame = player.PlayerGui:WaitForChild("PetsPurchaseGui").BuyPet
  11. local BuyButton = player.PlayerGui:WaitForChild("PetsPurchaseGui").BuyPet.Buy
  12. local CancelButton = player.PlayerGui:WaitForChild("PetsPurchaseGui").BuyPet.Close
  13. local Pets = PetsFolder.ActualPets:GetChildren()
  14. local button1
  15. local button2  
  16. --print(Pets)
  17. for i,v in pairs(MainFrame:GetDescendants())do
  18.     if v:IsA("ImageButton") and v.Name == "PetsButton" then    
  19.         for i,p in ipairs(PetValues)do 
  20.             button1 = v.MouseButton1Down:Connect(function(pet)         
  21.                 local function RunTest()                                           
  22.                     if p:IsA("BoolValue") and v:FindFirstChild("PetIndex").Value and v:FindFirstChild("PetIndex").Value == p.Name then  --  p.Name ==
  23.                         if debounce and player then    
  24.                             debounce = false   
  25.                             --local PetIsName = v:FindFirstChild("PetIndex").Value                                                                                                                                 
  26.                             if p.Value == false and v:FindFirstChild("PetIndex").Value and v:FindFirstChild("PetIndex").Value == p.Name and player.leaderstats.Coins.Value >= v.Price.Value then --and v:FindFirstChild("PetIndex").Value == p.Name-- and p[PetIsName] and p.Name == PetIsName 
  27.                                 local Frame = player:FindFirstChild("PlayerGui"):FindFirstChild("PetsPurchaseGui"):FindFirstChild("BuyPet")    
  28.                                 local FrameInfo = Frame:FindFirstChild("Desc")
  29.                                 local PetName = v:FindFirstChild("PetIndex").Value
  30.                                 local PetPrice = v:FindFirstChild("Price").Value
  31.  
  32.                                 print(v:FindFirstChild("PetIndex").Value .. " v - first if statement")         
  33.                                 print(p.Name .. " p.Name - 1st if statement")      
  34.                                 print(p.Value)         
  35.                                 FrameInfo.Text = "Are you Sure you want to buy this " .. PetName .. " for " .. PetPrice .. " Coins"        
  36.                                 Frame:TweenPosition(
  37.                                     UDim2.new(0.499, 0,0.494, 0),-- End Position       
  38.                                     "Out", -- Easing Direction
  39.                                     "Linear", -- Easing Style
  40.                                     .5 -- Time in Seconds
  41.                                 )  
  42.                                 Frame.Visible = true           
  43.                                 wait(.5)           
  44.                                 --      local thisbutton = v       
  45.                                 --      local newfunction = RunTest(thisbutton)
  46.                                 --      local something = "hi"
  47.                                 --BuyButton.MouseButton1Down:Connect(function(PetName,PetPrice)                
  48.                                 button2 = BuyButton.MouseButton1Down:Connect(function()                                                                                
  49.                                     -- damn it works!!!    
  50.                                     if debounce == false then          
  51.                                         --debounce = false                                                                                                     
  52.                                         local PetName = v:FindFirstChild("PetIndex").Value 
  53.                                         --  print(thisbutton)
  54.                                         --  print(newfunction)
  55.                                         --RunTest()        
  56.                                         print(PetName)
  57.                                         --RunTest()    
  58.                                         --  print(PetPrice)
  59.                                         --   print(RunTest())
  60.                                         --  print(v:FindFirstChild("PetIndex").Value .. " v - first if statement")                         
  61.                                         --  print(p.Name .. " p.Name - 1st if statement")      
  62.                                         --   print(p.Value)            
  63.                                         --  end)
  64.                                         --  return PetName
  65.                                         PetsPurchaseEvent:FireServer(p,PetPrice)
  66.                                         BuyFrame:TweenPosition(
  67.                                             UDim2.new(0.499, 0,-1, 0),-- End Position      
  68.                                             "Out", -- Easing Direction
  69.                                             "Linear", -- Easing Style
  70.                                             .5 -- Time in Seconds
  71.                                         )      
  72.                                         wait(.5)
  73.                                         for i,pets in pairs(Pets)do
  74.                                             if pets:IsA("Model") then              
  75.                                                 --  print(pets.Name)   
  76.                                                 if p.Value == true then --not player.Character:FindFirstChild(pets.Name)               
  77.                                                     if player.PetsFolder:FindFirstChild("PetNameCheck").Value == pets.Name and player.Character:FindFirstChild(pets.Name) then
  78.                                                         print("Pet was found in Character")
  79.                                                         v.PetPriceCheck.Text = "Equipped"
  80.                                                         break          
  81.                                                     end
  82.                                                     if player.PetsFolder:FindFirstChild("PetNameCheck").Value == "" and not player.Character:FindFirstChild(pets.Name) then
  83.                                                         print("Pet was not found in Character")
  84.                                                         v.PetPriceCheck.Text = "Owned" 
  85.                                                         break
  86.                                                     end --player.Character:FindFirstChild(pets.Name)
  87.                                                 end        
  88.                                             end                
  89.                                         end
  90.                                         button2:Disconnect()   
  91.                                         debounce = true    
  92.                                     end            
  93.                                 end)                   
  94.                                 --  debounce = true
  95.                                 --  return PetName         
  96.                             end    
  97.  
  98.                             if p.Value == false and v:FindFirstChild("PetIndex").Value and v:FindFirstChild("PetIndex").Value == p.Name and player.leaderstats.Coins.Value < v.Price.Value then -- and PetIsName                                 
  99.                                 v.PetPriceCheck.Text = "Not Enough Coins"
  100.                                 wait(0.5)
  101.                                 v.PetPriceCheck.Text = v.Price.Value .. " Coins" -- resets the price to its default per pet                                                                                
  102.                                 --     print(p.Name .. " p.Name - second if statement")    
  103.                                 --     print(v:FindFirstChild("PetIndex").Value .. " v - second if statement")     
  104.                                 --     print(p.Value)      
  105.                                 debounce = true    
  106.                             end                
  107.                             if p.Value == true then --and v:FindFirstChild("PetIndex").Value == p.Name and player.leaderstats.Coins.Value >= v.Price.Value or player.leaderstats.Coins.Value < v.Price.Value then                      
  108.                                 --     print(p.Name .. " p.Name - Third if statement")     
  109.                                 --     print(v:FindFirstChild("PetIndex").Value .. " v - Third if statement")  
  110.                                 --     print(p.Value)          
  111.                                 --v.PetPriceCheck.Text = "Owned"       
  112.                                 PetsPurchaseEvent:FireServer(p)
  113.                                 print("We own the pet firing remote event")
  114.                                
  115.                                 debounce = true        
  116.                             end        
  117.                             --  debounce = true    
  118.  
  119.                             --print("Making sure you work")    
  120.                     --      while wait()do
  121.                             for i,pets in pairs(Pets)do
  122.                                 if pets:IsA("Model") then              
  123.                                     --  print(pets.Name)
  124.                                     if p.Value == true then                                                                            
  125.                                         if player.PetsFolder:FindFirstChild("PetNameCheck").Value == pets.Name then
  126.                                         --  print("Pet was found in Character")
  127.                                             v.PetPriceCheck.Text = "Owned"
  128.                                             break          
  129.                                         end
  130.                                         if player.PetsFolder:FindFirstChild("PetNameCheck").Value == "" then
  131.                                         --  print("Pet was found in Character")
  132.                                             v.PetPriceCheck.Text = "Equipped"  
  133.                                             break
  134.                                         end    
  135.                                     end        
  136.                                 end                
  137.                             end
  138.                                 --  v.PetPriceCheck.Text = v.Price.Value .. " Coins"
  139.                         --  end
  140.                         end                                        
  141.                     end    
  142.                     wait() 
  143.                     --break
  144.                 end                
  145.                 RunTest()
  146.                 button1:Disconnect()
  147.             end)
  148.         end
  149.     end
  150.  
  151.     if v:IsA("ImageButton") and v.Name == "PetsGamepassButton" then -- gamepass experiment stuff
  152.         --print("not my nigga") -- script will run when player is loaded basically the for loop:)
  153.         v.MouseButton1Down:Connect(function()
  154.             if debounce and player then        
  155.                 --  print("not my nigga")          
  156.             end
  157.         end)
  158.     end
  159.    
  160.     if v:IsA("ImageButton") and v.Name == "PetsHiddenButton" then -- hidden experiment stuff
  161.         --print("not my nigga") -- script will run when player is loaded basically the for loop:)
  162.         v.MouseButton1Down:Connect(function()
  163.             if debounce and player then        
  164.                 -- if stat bla bla = true then do this bam
  165.                 -- print("not my hidden nigga")                    
  166.             end
  167.         end)
  168.     end
  169. end
  170.  
  171. CancelButton.MouseButton1Down:Connect(function()
  172.     if not debounce and player then
  173.         --debounce = false
  174.         BuyFrame:TweenPosition(
  175.             UDim2.new(0.499, 0,-1, 0),-- End Position      
  176.             "Out", -- Easing Direction
  177.             "Linear", -- Easing Style
  178.             .5 -- Time in Seconds
  179.         )      
  180.         wait(.5)
  181.         button2:Disconnect()
  182.         BuyFrame.Visible = false   
  183.         debounce = true
  184.     end
  185. end)
  186. -- The Server Side Script
  187. local DataStoreService = game:GetService("DataStoreService")
  188. local data = DataStoreService:GetDataStore("PetShop")
  189. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  190. local PetsFolder = ReplicatedStorage.Pets
  191. local PetsPurchaseEvent = PetsFolder.PetEvents.PetsPurchase
  192. local Pets = PetsFolder.ActualPets:GetChildren()
  193. local debounce = true
  194.  
  195. game.Players.PlayerAdded:Connect(function(player)
  196.     --Pets stuff
  197.     local PetsFolder = Instance.new("Folder",player); PetsFolder.Name = "PetsFolder"
  198.     local Pets = Instance.new("Folder",PetsFolder); Pets.Name = "Pets"
  199.     local PetsValues = Instance.new("Folder",PetsFolder); PetsValues.Name = "Values"
  200.     local PetNameCheck = Instance.new("StringValue",PetsFolder); PetNameCheck.Name = "PetNameCheck"
  201.     --Pets Values
  202.     local Turtle = Instance.new("BoolValue",PetsValues); Turtle.Name = "Turtle"
  203.     local Bunny = Instance.new("BoolValue",PetsValues); Bunny.Name = "Bunny"
  204.     local Parrot = Instance.new("BoolValue",PetsValues); Parrot.Name = "Parrot"
  205.     local PiggyBank = Instance.new("BoolValue",PetsValues); PiggyBank.Name = "Piggy Bank"
  206.     local MrCrab = Instance.new("BoolValue",PetsValues); MrCrab.Name = "Mr.Crab"
  207.     local PufferFish = Instance.new("BoolValue",PetsValues); PufferFish.Name = "Puffer Fish"
  208.     local Hedgehog = Instance.new("BoolValue",PetsValues); Hedgehog.Name = "Hedgehog"
  209.     local CrocodilePal = Instance.new("BoolValue",PetsValues); CrocodilePal.Name = "CrocodilePal"
  210.     local KingFrog = Instance.new("BoolValue",PetsValues); KingFrog.Name = "King Frog"
  211.     local Kitty = Instance.new("BoolValue",PetsValues); Kitty.Name = "Kitty"
  212.     local EpicDuck = Instance.new("BoolValue",PetsValues); EpicDuck.Name = "Epic Duck"
  213.     local Octopus = Instance.new("BoolValue",PetsValues); Octopus.Name = "Octopus"
  214.     local PetRock = Instance.new("BoolValue",PetsValues); PetRock.Name = "Pet Rock"
  215.     local SeaMonster = Instance.new("BoolValue",PetsValues); SeaMonster.Name = "Sea Monster"
  216.     local Pikachu = Instance.new("BoolValue",PetsValues); Pikachu.Name = "Pikachu"
  217.     local OOFSpider = Instance.new("BoolValue",PetsValues); OOFSpider.Name = "OOF Spider"
  218.     local PetGojira = Instance.new("BoolValue",PetsValues); PetGojira.Name = "Pet Gojira"
  219.     local Scorpion = Instance.new("BoolValue",PetsValues); Scorpion.Name = "Scorpion"
  220.     local HungryShark = Instance.new("BoolValue",PetsValues); HungryShark.Name = "Hungry Shark"
  221.     local AnnoyingOrange = Instance.new("BoolValue",PetsValues); AnnoyingOrange.Name = "Annoying Orange"
  222.     local EvilUnicorn = Instance.new("BoolValue",PetsValues); EvilUnicorn.Name = "Evil Unicorn"
  223.     local ArticReindeer = Instance.new("BoolValue",PetsValues); ArticReindeer.Name = "Artic Reindeer"
  224.     local Bird = Instance.new("BoolValue",PetsValues); Bird.Name = "Bird"
  225.     local GrayWolf = Instance.new("BoolValue",PetsValues); GrayWolf.Name = "Gray Wolf"
  226.     local Dog = Instance.new("BoolValue",PetsValues); Dog.Name = "Dog"
  227.     local Otter = Instance.new("BoolValue",PetsValues); Otter.Name = "Otter"
  228.     local AlienBee = Instance.new("BoolValue",PetsValues); AlienBee.Name = "Alien Bee"
  229.     local TRex = Instance.new("BoolValue",PetsValues); TRex.Name = "T-Rex"
  230.     local Phoenix = Instance.new("BoolValue",PetsValues); Phoenix.Name = "Phoenix"
  231.     local HellDragon = Instance.new("BoolValue",PetsValues); HellDragon.Name = "Hell Dragon"
  232.     --Hidden Pet Value
  233.     local HiddenPetValue = Instance.new("BoolValue",PetsValues); HiddenPetValue.Name = "Eye of Cthulhu"
  234.    
  235. end)
  236.  
  237. PetsPurchaseEvent.OnServerEvent:Connect(function(player,p,PetPrice)
  238.     local previouspet = player.Character:FindFirstChild("Turtle") or player.Character:FindFirstChild("Bunny") or player.Character:FindFirstChild("Parrot") or player.Character:FindFirstChild("Piggy Bank") or player.Character:FindFirstChild("Mr.Crab") or player.Character:FindFirstChild("Puffer Fish") or player.Character:FindFirstChild("Hedgehog") or player.Character:FindFirstChild("CrocodilePal") or player.Character:FindFirstChild("King Frog") or player.Character:FindFirstChild("Kitty") or player.Character:FindFirstChild("Epic Duck") or player.Character:FindFirstChild("Octopus") or player.Character:FindFirstChild("Pet Rock") or player.Character:FindFirstChild("Sea Monster") or player.Character:FindFirstChild("Pikachu") or player.Character:FindFirstChild("OOF Spider") or player.Character:FindFirstChild("Pet Gojira") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Hungry Shark") or player.Character:FindFirstChild("Annoying Orange") or player.Character:FindFirstChild("Evil Unicorn") or player.Character:FindFirstChild("Artic Reindeer") or player.Character:FindFirstChild("Bird") or player.Character:FindFirstChild("Gray Wolf") or player.Character:FindFirstChild("Dog") or player.Character:FindFirstChild("Otter") or player.Character:FindFirstChild("Alien Bee") or player.Character:FindFirstChild("T-Rex") or player.Character:FindFirstChild("Phoenix") or player.Character:FindFirstChild("Hell Dragon") or player.Character:FindFirstChild("Dragon") or player.Character:FindFirstChild("DragonTest") or player.Character:FindFirstChild("Shadow Dragon") or player.Character:FindFirstChild("Megavore") or player.Character:FindFirstChild("Magma Dragon") or player.Character:FindFirstChild("Eye of Cthulhu")  
  239.     print("Received Server message")
  240.     print(p)
  241.     print(p.Name)
  242.     local Values = player.PetsFolder.Values
  243.     for i,v in pairs(Values:GetDescendants()) do
  244.         if v:IsA("BoolValue") then
  245.             --print(v.Name)
  246.             --print(v.Name == p.Name)
  247.             if v.Name == p.Name then
  248.                 print("To the Next Step")
  249.                 --  print(v.Name == p)
  250.             --  print(v.Name)
  251.             --  print(v.Value)
  252.                 if v.Value == true then
  253.                     print(v.Name.." Owned")
  254.                     for i,pets in pairs(Pets) do
  255.                     --  print(pets.Name)
  256.                         if pets:IsA("Model") and p.Name == pets.Name then
  257.                             print(pets.Name)
  258.                             --local previouspet =   pets
  259.                             local previouspet = player.Character:FindFirstChild("Turtle") or player.Character:FindFirstChild("Bunny") or player.Character:FindFirstChild("Parrot") or player.Character:FindFirstChild("Piggy Bank") or player.Character:FindFirstChild("Mr.Crab") or player.Character:FindFirstChild("Puffer Fish") or player.Character:FindFirstChild("Hedgehog") or player.Character:FindFirstChild("CrocodilePal") or player.Character:FindFirstChild("King Frog") or player.Character:FindFirstChild("Kitty") or player.Character:FindFirstChild("Epic Duck") or player.Character:FindFirstChild("Octopus") or player.Character:FindFirstChild("Pet Rock") or player.Character:FindFirstChild("Sea Monster") or player.Character:FindFirstChild("Pikachu") or player.Character:FindFirstChild("OOF Spider") or player.Character:FindFirstChild("Pet Gojira") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Hungry Shark") or player.Character:FindFirstChild("Annoying Orange") or player.Character:FindFirstChild("Evil Unicorn") or player.Character:FindFirstChild("Artic Reindeer") or player.Character:FindFirstChild("Bird") or player.Character:FindFirstChild("Gray Wolf") or player.Character:FindFirstChild("Dog") or player.Character:FindFirstChild("Otter") or player.Character:FindFirstChild("Alien Bee") or player.Character:FindFirstChild("T-Rex") or player.Character:FindFirstChild("Phoenix") or player.Character:FindFirstChild("Hell Dragon") or player.Character:FindFirstChild("Dragon") or player.Character:FindFirstChild("DragonTest") or player.Character:FindFirstChild("Shadow Dragon") or player.Character:FindFirstChild("Megavore") or player.Character:FindFirstChild("Magma Dragon") or player.Character:FindFirstChild("Eye of Cthulhu")
  260.                             if previouspet and player.PetsFolder:FindFirstChild("PetNameCheck").Value ~= p.Name  then --or player.PetsTestFolder:FindFirstChild("PetNameCheck").Value ~= ""
  261.                                 print("Pet owned and its not the same so we will destroy it")
  262.                                 print("Destroy")
  263.                                 --local pet =   player.Character:FindFirstChild(pets.Name):Destroy()
  264.                                 --player.Character:FindFirstChild(pets.Name):Destroy()
  265.                                 previouspet:Destroy()
  266.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = ""
  267.                                 local pet = pets:Clone()
  268.                                 pet.Parent = player.Character
  269.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = pets.Name
  270.                                 break
  271.                             end
  272.                             if previouspet and player.PetsFolder:FindFirstChild("PetNameCheck").Value == p.Name and v.Name == p.Name then -- also need to fix or player.PetsFolder:FindFirstChild("PetNameCheck").Value ~= p.Name
  273.                                 print("Pet owned and its in inventory so we will destroy it")
  274.                                 print("Destroy")
  275.                                 --local pet =   player.Character:FindFirstChild(pets.Name):Destroy()
  276.                                 --player.Character:FindFirstChild(pets.Name):Destroy()
  277.                                 previouspet:Destroy()
  278.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = ""
  279.                                 break
  280.                             end
  281.                             if not previouspet and player.PetsFolder:FindFirstChild("PetNameCheck").Value == "" and v.Name == p.Name then -- something is fishy about this line of code
  282.                                 print("Pet owned and its not in inventory so we will clone it")
  283.                                 print("Clone")
  284.                                 local pet = pets:Clone()
  285.                                 pet.Parent = player.Character
  286.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = pets.Name
  287.                                 break  
  288.                             end
  289.                     --[[        if previouspet and v.Name ~= p.Name and player.PetsFolder:FindFirstChild("PetNameCheck").Value ~= p.Name then -- something is fishy about this line of code
  290.                                 previouspet:Destroy()
  291.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = ""
  292.                                 local pet = pets:Clone()
  293.                                 pet.Parent = player.Character
  294.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = pets.Name
  295.                                 break  
  296.                             end--]]        
  297.                         end
  298.                     end
  299.                 else
  300.                     print(v.Name.." Not Owned")
  301.                     print(PetPrice)
  302.                     if player.leaderstats.Coins.Value >= PetPrice then 
  303.                     player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - PetPrice
  304.                     v.Value = true 
  305.                         for i,pets in pairs(Pets) do
  306.                             if p.Name == pets.Name then
  307.                                 local previouspet = player.Character:FindFirstChild("Turtle") or player.Character:FindFirstChild("Bunny") or player.Character:FindFirstChild("Parrot") or player.Character:FindFirstChild("Piggy Bank") or player.Character:FindFirstChild("Mr.Crab") or player.Character:FindFirstChild("Puffer Fish") or player.Character:FindFirstChild("Hedgehog") or player.Character:FindFirstChild("CrocodilePal") or player.Character:FindFirstChild("King Frog") or player.Character:FindFirstChild("Kitty") or player.Character:FindFirstChild("Epic Duck") or player.Character:FindFirstChild("Octopus") or player.Character:FindFirstChild("Pet Rock") or player.Character:FindFirstChild("Sea Monster") or player.Character:FindFirstChild("Pikachu") or player.Character:FindFirstChild("OOF Spider") or player.Character:FindFirstChild("Pet Gojira") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Scorpion") or player.Character:FindFirstChild("Hungry Shark") or player.Character:FindFirstChild("Annoying Orange") or player.Character:FindFirstChild("Evil Unicorn") or player.Character:FindFirstChild("Artic Reindeer") or player.Character:FindFirstChild("Bird") or player.Character:FindFirstChild("Gray Wolf") or player.Character:FindFirstChild("Dog") or player.Character:FindFirstChild("Otter") or player.Character:FindFirstChild("Alien Bee") or player.Character:FindFirstChild("T-Rex") or player.Character:FindFirstChild("Phoenix") or player.Character:FindFirstChild("Hell Dragon") or player.Character:FindFirstChild("Dragon") or player.Character:FindFirstChild("DragonTest") or player.Character:FindFirstChild("Shadow Dragon") or player.Character:FindFirstChild("Megavore") or player.Character:FindFirstChild("Magma Dragon") or player.Character:FindFirstChild("Eye of Cthulhu")
  308.                                 if previouspet and player.PetsFolder:FindFirstChild("PetNameCheck").Value ~= "" then
  309.                                 print("Checking Before Cloning")   
  310.                                 previouspet:Destroy()
  311.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = ""
  312.                                 local pet = pets:Clone()
  313.                                 pet.Parent = player.Character
  314.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = pets.Name
  315.                                 else   
  316.                                 print("Cloning")
  317.                                 --print(pets)
  318.                                 local pet = pets:Clone()
  319.                                 pet.Parent = player.Character
  320.                                 player.PetsFolder:FindFirstChild("PetNameCheck").Value = pets.Name
  321.                                 end
  322.                             end
  323.                         end
  324.                     else
  325.                         print("Player Doesnt Have the Coin,Hes Poor")
  326.                     end
  327.                 end    
  328.             end
  329.         end
  330.     end
  331. end)
  332.  
Add Comment
Please, Sign In to add comment