#sup guys trynna help hahaha!
1 messages · Page 1 of 1 (latest)
HERE IS SCRIPT
local roundLength = 15
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local inRound = ReplicatedStorage:WaitForChild("InRound")
local status = ReplicatedStorage:WaitForChild("Status")
local playingTeam = Teams:WaitForChild("Competitors")
local lobbyTeam = Teams:WaitForChild("Spectators")
-- Handle round state changes
inRound.Changed:Connect(function()
for _, plr in pairs(Players:GetPlayers()) do
if not plr.Character then
plr.CharacterAdded:Wait()
end
local char = plr.Character
local hrp = char:WaitForChild("HumanoidRootPart")
local humanoid = char:WaitForChild("Humanoid")
if inRound.Value then
hrp.CFrame = workspace.RoundSpawn.CFrame
plr.Team = playingTeam
humanoid.Died:Once(function()
plr.Team = lobbyTeam
end)
else
hrp.CFrame = workspace.LobbySpawn.CFrame
plr.Team = lobbyTeam
end
end
end)
-- Round loop
local function round()
while true do
local requiredPlayers = 2
repeat
task.wait(1)
status.Value = "At least "..requiredPlayers.." players are needed to start"
until #Players:GetPlayers() >= requiredPlayers
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game starts in "..i.." seconds"
task.wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Game ends in "..i.." seconds"
local playing = {}
for _, plr in pairs(Players:GetPlayers()) do
if plr.Team == playingTeam then
table.insert(playing, plr)
end
end
if #playing == 0 then
status.Value = "Everyone has died!"
task.wait(3)
break
end
if #playing == 1 then
local winner = playing[1]
status.Value = winner.Name.." has won the game!"
if winner:FindFirstChild("leaderstats") then
winner.leaderstats.Wins.Value += 1
end
task.wait(3)
break
end
task.wait(1)
end
task.wait(3)
end
end
task.spawn(round)```
it was by some tutorial
remember to enable api services
enabled it and it broke the script
** You are now Level 3! **
that script doesnt teleport you
** You are now Level 17! **