Дополнен 1 месяц назад
Также в модуле используется вот этот скрипт
local module = {}
local status = game.ReplicatedStorage.Status
local teams = game.Teams
function module.CountDown(length:number, theme:string)
for second = length, 0, -1 do
wait(1)
status.Value = theme.. ": ".. second
end
end
function module.Round(length:number)
local result = "killer won"
for second = length, 0, -1 do
wait(1)
status.Value = "Round: ".. second
local playing = #teams.Playing:GetPlayers()
local escaped = #teams.Escaped:GetPlayers()
local killers = #teams.Killer:GetPlayers()
if escaped > 0 then
result = "killer lose"
status.Value = "Killer lose"
break
end
if killers == 0 then
result = "killer left"
status.Value = "Killer left!"
break
end
if playing == 0 then
result = "killer won"
status.Value = "Killer won!"
break
end
end
return result
end
function module.ChooseKiller()
local killer = game.Players:GetPlayers()[math.random(1, #game.Players:GetPlayers())]
return killer
end
function module.DressUp(player, name)
local char = game.ReplicatedStorage.Skins:FindFirstChild(name):Clone()
char:PivotTo(player.Character.PrimaryPart.CFrame)
char.Name = player.Name
player.Character = char
char.Parent = workspace
end
return module
local killer = module.ChooseKiller()
game.ReplicatedStorage.Status.Value = "Killer is ".. killer.Name
wait(1)
(Вот здесь он зависает)
--превращаем его
module.DressUp(killer, "Skin")
killer.Team = game.Teams.Killer