local Players = game:GetService("Players")
local players = Players:GetPlayers()
for _, player in ipairs(players) do
print(player.Name)
endfor i = 5, 1, -1 do
print("Начало через: " .. i)
task.wait(1)
end
print("Мини-игра началась!")local timeLeft = 30
while timeLeft > 0 do
print("Осталось: " .. timeLeft)
timeLeft -= 1
task.wait(1)
end
print("Время вышло!")local coin = script.Parent
coin.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
print(player.Name .. " собрал монету")
end
end)local score = Instance.new("IntValue")
score.Name = "Score"
score.Value = 0
score.Parent = playerscore.Value += 1local winner = nil
local bestScore = -1
for _, player in ipairs(game.Players:GetPlayers()) do
local score = player:FindFirstChild("Score")
if score and score.Value > bestScore then
bestScore = score.Value
winner = player
end
end
if winner then
print("Победитель: " .. winner.Name)
endwinner.leaderstats.Coins.Value += 100player.leaderstats.Coins.Value += 25