Advertisement
Sungmingamerpro13

PizzaBox (Script)

Mar 28th, 2024
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.53 KB | None | 0 0
  1. local Storage = game:GetService("ServerStorage")
  2. local Part = script.Parent
  3.  
  4. local Tool = game.ServerStorage.Items.Apple
  5.  
  6. local ClickDetector = Instance.new("ClickDetector", Part)
  7.  
  8. local ToolName = script.Parent.Name
  9.  
  10. ClickDetector.MouseClick:Connect(function(player)
  11.     if not player.Backpack:FindFirstChild("Pizza") then
  12.         Storage.Items[ToolName]:Clone().Parent = player.Backpack
  13.     end
  14.    
  15.     if player.Backpack:FindFirstChild("Pizza").stacks.Value > 1 then
  16.         player.Backpack:FindFirstChild("Pizza").stacks.Value += 1
  17.     end
  18. end)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement