Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local connectsound = Instance.new("Sound")
- connectsound.SoundId = "http://www.roblox.com/asset/?id=908986473"
- connectsound.Volume = 10
- connectsound.Parent = game.Lighting
- connectsound.Pitch = 1
- connectsound.Looped = false
- local connectsoundb = Instance.new("Sound")
- connectsoundb.SoundId = "http://www.roblox.com/asset/?id=908986616"
- connectsoundb.Volume = 10
- connectsoundb.Parent = game.Lighting
- connectsoundb.Pitch = 1
- connectsoundb.Looped = false
- --[[
- Distrubated/Edited by Axovua.
- Original Soruces
- Wiki: http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded
- User: Narrev
- ]]--
- -- Place in StarterGui.
- local Players = game:GetService("Players")
- function onPlayerAdded(player)
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = ("".. player.Name .. " connected.");
- Color = Color3.new(0,40,255);
- Font = Enum.Font.SourceSansBold;
- FontSize = Enum.FontSize.Size18;
- connectsound:Play()
- })
- end
- Players.PlayerAdded:connect(onPlayerAdded)
- for _,player in pairs(Players:GetPlayers()) do
- onPlayerAdded(player)
- end
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = ("Player join message has loaded");
- Color = Color3.new(0,40,255);
- Font = Enum.Font.SourceSansBold;
- FontSize = Enum.FontSize.Size18;
- connectsound:Play()
- })
- game.Players.PlayerRemoving:connect(function(player)
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = ("".. player.Name .. " has left the game.");
- Color = Color3.new(0,40,255);
- Font = Enum.Font.SourceSansBold;
- FontSize = Enum.FontSize.Size18;
- connectsoundb:Play()
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement