Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Script sword giver:

local Debounce = false

script.Parent.Button.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid")then
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
local Tool = game.ReplicatedStorage.Tools.ClassicSword

if Debounce == false then


Debounce = true

if Player:WaitForChild("Backpack"):FindFirstChild(Tool.Name) or
Hit.Parent:FindFirstChild(Tool.Name) then
print("Player Already Has Tool")
wait(1)
Debounce = false
else
Tool:Clone().Parent = Player:WaitForChild("Backpack")
wait(1)
Debounce = false
end
end
end
end)
Script leaderstats:
game.Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new("Folder",Player)
leaderstats.Name = "leaderstats"

local Cash = Instance.new("NumberValue",leaderstats)


Cash.Name = "Cash"
Cash.Value = 0
local OwnsTycoon = Instance.new("BoolValue",Player)
OwnsTycoon.Name = "OwnsTycoon"
OwnsTycoon.Value = false
end)
Script Cash Display:
local Player = game.Players.LocalPlayer

while wait() do
script.Parent.TextLabel.Text = "Cash:$"..Player.leaderstats.Cash.Value
end

You might also like