ServerScriptService==>Server
ServerScriptService==>leaderstats
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local cash = Instance.new("IntValue")
cash.Name = "Cash"
cash.Value = 0
cash.Parent = leaderstats
end)
StarterGui==>ClientUI==>Control
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Label = script.Parent.LightStatus
ReplicatedStorage.isRedLight.Changed:Connect(function(isRedLight)
if isRedLight then
Label.Text = "RED LIGHT"
Label.TextColor3 = Color3.fromRGB(255,0,0)
else
Label.Text = "GREEN LIGHT"
Label.TextColor3 = Color3.fromRGB(0,255,0)
end
end)
ServerscriptService==>Script==> rename as Ragdoll Death
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if character:FindFirstChild("UpperTorso") then
script.RagdollClient:Clone().Parent = character
character:WaitForChild("Humanoid").Died:connect(function()
character.UpperTorso:SetNetworkOwner(player)
end)
end
end)
end)