game.Players.PlayerAdded:Connect(function()
game.ServerStorage.Playernum.Value = game.ServerStorage.Playernum.Value +1
end)
game.Players.PlayerRemoving:Connect(function()
game.ServerStorage.Playernum.Value = game.ServerStorage.Playernum.Value -1
end)
game.Players.PlayerAdded:Connect(function()
if game.ServerStorage.Playernum.Value > 1 then
script.Parent.Gameintermission.Disabled = false
else
script.Parent.Game.Disabled = true
game.StarterGui.Time.Frame.TextLabel.Text = ("Waiting For Players")
script.Parent.Gameintermission.Disabled = true
end
end)
game.Players.PlayerRemoving:Connect(function()
if game.ServerStorage.Playernum.Value > 1 then
script.Parent.Gameintermission.Disabled = false
else
script.Parent.Game.Disabled = true
game.StarterGui.Time.Frame.TextLabel.Text = ("Waiting For Players")
script.Parent.Gameintermission.Disabled = true
end
end)
--My Script is used to be check check players and run game --note: this is normal script in serverscriptservice
local inttime = game.Workspace.intermission.Value
inttime = 30
for i= 30, 0, -1
do
inttime = inttime -1
wait(1)
end
if game.Workspace.intermission == 0 then
script.Parent.GameSelect.Disabled = false
script.Disabled = true
endlocal inttime = game.Workspace.intermission.Value
inttime = 30
for i= 30, 0, -1
do
inttime = inttime -1
wait(1)
end
if game.Workspace.intermission == 0 then
script.Parent.GameSelect.Disabled = false
script.Disabled = true
end
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder",plr)
leaderstats.Name = ("leaderstats")
local cash = Instance.new("IntValue",leaderstats)
cash.Name = ("Bloxs")
local level = Instance.new("IntValue",leaderstats)
level.Name = ("Level")
end)
