BumpyPlayz

ServerToReplicatedStorage

Feb 5th, 2020
3,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. for i, tool in pairs(game.ServerStorage:WaitForChild("Tools"):GetChildren()) do
  2.    
  3.     if tool:IsA("Tool") then
  4.         local new = Instance.new("ImageLabel")
  5.         new.Image = tool.TextureId
  6.         new.Name = tool.ItemNumber.Value
  7.         local name = Instance.new("StringValue", new)
  8.         name.Name = "ToolName"
  9.         name.Value = tool.Name
  10.         local cost = Instance.new("NumberValue", new)
  11.         cost.Name = "Cost"
  12.         cost.Value = tool.Cost.Value
  13.         new.Parent = game.ReplicatedStorage.ToolsImage
  14.     end
  15.  
  16. end
  17.  
  18.  
  19.  
  20. local isthere = 0
  21. for i, v in pairs(game.ServerStorage.Tools:GetChildren()) do
  22.     isthere = isthere+1
  23. end
  24.  
  25. local new = Instance.new("NumberValue", game.ReplicatedStorage)
  26. new.Name = "TotalTools"
  27. new.Value = isthere
Add Comment
Please, Sign In to add comment