I opened a shop on the game and you have to use coins to purchase it. Thing is the Tools Ingame Visible to you but Invisible to Everyone else
local player=game.Players.LocalPlayer local leaderboard=player:WaitForChild("leaderstats") local button=script.Parent local price=button:WaitForChild("Price") local item=button:WaitForChild("ItemName") local rs=game:GetService("ReplicatedStorage") local createPartEvent = rs:WaitForChild("Purchase") button.MouseButton1Click:connect(function() if leaderboard.Coins.Value>=price.Value then createPartEvent:FireServer( leaderboard.Coins.Value==leaderboard.Coins.Value-price.Value) local item=rs:WaitForChild(item.Value) item:Clone().Parent=player.StarterGear item:Clone().Parent=player.Backpack end end) while wait()do button.Text=item.Value.."-"..price.Value end
Create a RemoteEvent that clones the tool
Local Script:
local rs = game:GetService('ReplicatedStorage') local GiveToolEvent = rs:WaitForChild("GiveTool") button.MouseButton1Click:connect(function() if leaderboard.Coins.Value>=price.Value then createPartEvent:FireServer( leaderboard.Coins.Value==leaderboard.Coins.Value-price.Value) GiveToolEvent:FireServer(item.Value) end end)
Server Script:
local rs = game:GetService('ReplicatedStorage') local GiveToolEvent = rs:WaitForChild("GiveTool") GiveToolEvent.OnServerEvent:connect(function(player, toolname) local tool = rs:FindFirstChild(toolname) tool:Clone().Parent = player.StarterGear tool:Clone().Parent = player.Backpack end)