Advertisement
RandomNewbieScripter

the sun is a deadly laser

Jul 10th, 2017
1,459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.62 KB | None | 0 0
  1. local connectsound = Instance.new("Sound")
  2. connectsound.SoundId = "http://www.roblox.com/asset/?id=908986473"
  3. connectsound.Volume = 10
  4. connectsound.Parent = game.Lighting
  5. connectsound.Pitch = 1
  6. connectsound.Looped = false
  7.  
  8. local connectsoundb = Instance.new("Sound")
  9. connectsoundb.SoundId = "http://www.roblox.com/asset/?id=908986616"
  10. connectsoundb.Volume = 10
  11. connectsoundb.Parent = game.Lighting
  12. connectsoundb.Pitch = 1
  13. connectsoundb.Looped = false
  14.  
  15. --[[
  16. Distrubated/Edited by Axovua.
  17.     Original Soruces
  18. Wiki: http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded
  19. User: Narrev
  20. ]]--
  21.  
  22. -- Place in StarterGui.
  23.  
  24. local Players = game:GetService("Players")
  25.  
  26. function onPlayerAdded(player)
  27.     game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
  28.     Text = ("".. player.Name .. " connected.");
  29.     Color = Color3.new(0,40,255);
  30.     Font = Enum.Font.SourceSansBold;
  31.     FontSize = Enum.FontSize.Size18;
  32.     connectsound:Play()
  33. })
  34. end
  35.  
  36. Players.PlayerAdded:connect(onPlayerAdded)
  37.  
  38. for _,player in pairs(Players:GetPlayers()) do
  39.      onPlayerAdded(player)
  40. end
  41.  
  42. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
  43.     Text = ("Player join message has loaded");
  44.     Color = Color3.new(0,40,255);
  45.     Font = Enum.Font.SourceSansBold;
  46.     FontSize = Enum.FontSize.Size18;
  47.     connectsound:Play()
  48. })
  49.  
  50. game.Players.PlayerRemoving:connect(function(player)
  51.     game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
  52.     Text = ("".. player.Name .. " has left the game.");
  53.     Color = Color3.new(0,40,255);
  54.     Font = Enum.Font.SourceSansBold;
  55.     FontSize = Enum.FontSize.Size18;
  56.     connectsoundb:Play()
  57. })
  58. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement