Instructions:
Instance.new('Fire', Game.Workspace.Terrain).Size = 100
Instance.new("Explosion", Game.Workspace.Terrain)
The 'Player' and its script only shows during the game and not when your development the game.
game.Players.PlayerAdded:connect(function(player)
local msg = Instance.new('Message', Workspace)
msg.Text = player.Name .. " has entered the game."
wait(5)
msg:Destroy()
end)
local part = Instance.new('Part', Workspace)
part.Touched:connect(function()
print("Part was touched.")
end)
Workspace.Part.Touched:connect(function(hit)
if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent) then
local exp = Instance.new('Explosion', Workspace)
exp.Position = hit.Position
end
end)
game.Players.PlayerAdded:connect(function(player)
local leader, score = Instance.new('IntValue', player),
Instance.new('IntValue')
leader.Name = 'leaderstats'
score.Name = 'Score'
score.Parent = leader
end)
game.Lighting:SetMinutesAfterMidnight(5 * 60)
function addPoints(player)
local findScore = game.Players:FindFirstChild(player.Parent.Name)
findScore.leaderstats.Score.Value = findScore.leaderstats.Score.Value + 10
wait(5)
end
Game.Workspace["Drooling Zombie"]["Left Arm"].Touched:connect(addPoints)
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local msg = Instance.new('Message', Workspace)
msg.Text = player.Name .. " has died in vain."
wait(5)
msg:Destroy()
end)
end)
end)