Advertisement
XxxLloyd061302xxX

Buy Script

Jul 29th, 2018
8,322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. game.ReplicatedStorage.ShopBuy.OnServerEvent:Connect(function(player,page)
  2.     local tool = game.ReplicatedStorage:WaitForChild("Tools")
  3.     local shop = game.Workspace.Shop
  4.     local clone = tool:FindFirstChild(shop:FindFirstChild("Part"..page).ItemName.Value):Clone()
  5.     local clone2 = tool:FindFirstChild(shop:FindFirstChild("Part"..page).ItemName.Value):Clone()
  6.     clone.Parent = player.Backpack
  7.     clone2.Parent = player.StarterGear -- So that the player won't lose the tool even if they died.
  8. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement