Riley_Huntley

Dun dun

Feb 8th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.66 KB | None | 0 0
  1. -- NOTE: This script was created by ElectricBlaze, Scripting Tier-3 in Scripting Helpers, ex-Writer in LuaLearners, and Writer on the ROBLOX Wiki.
  2. --
  3. -- This script allows users to give each player a different banner over their heads depending on their role in a group.
  4. -- The banner must be a decal that was already created.
  5. -- The script will follow. Please read EVERYTTHING carefully.
  6. -- The instructions will be near the end of the script.
  7. -- There is only one editble thing you must do.
  8. --
  9. local imageOrText = "image"
  10. --
  11. -- Where I typed image, you can either keep it as that, or type text so that the banner will be text rather than an image.
  12. --
  13. -- Do not edit below.
  14. --
  15. function banner(player, group, role, image)
  16.     role = role or ""
  17.     image = image or ""
  18.     local gui = Instance.new("BillboardGui", player.Character.Head)
  19.     gui.Adornee = player.Character.Head
  20.     gui.Size = UDim2.new(2, 0, 3, 0)
  21.     gui.StudsOffset = Vector3.new(0.2, 1, 0)
  22.     if imageOrText:lower() == "image" then
  23.         if player:GetRoleInGroup(group) == role then
  24.             local il = Instance.new("ImageLabel", gui)
  25.             il.Image = image
  26.             il.Size = UDim2.new(1, 0, 0.75, 0)
  27.             il.Position = UDim2.new(-0.125, 0, -0.25, 0)
  28.             il.BackgroundTransparency = 1
  29.         end
  30.     elseif imageOrText:lower() == "text" then
  31.         local tl = Instance.new("TextLabel", gui)
  32.         tl.Text = player:GetRoleInGroup(group)
  33.         tl.TextColor3 = Color3.new(0, 0, 0)
  34.         tl.Font = "ArialBold"
  35.         tl.TextScaled = true
  36.         tl.Size = UDim2.new(1, 0, 0.75, 0)
  37.         tl.Position = UDim2.new(-0.125, 0, -0.25, 0)
  38.         tl.BackgroundTransparency = 1
  39.     end
  40. end
  41. --
  42. game.Players.PlayerAdded:connect(function(player)
  43.     player.CharacterAdded:connect(function(char)
  44.         -- Here is where your instructions begin.
  45.         -- 1. First type the word banner, followed by opening parenthesis, i.e. (.
  46.         -- 2. Then type a comma, followed by the word "player", followed by another comma.
  47.         -- 3. Then type the ID of the group you're checking from. The ID is the number at the end of the group's URL.
  48.         -- 4. Then type another comma, followed by the name of the role you're checking from, in double quotes, i.e. "".
  49.         -- 5. Then type another comma, followed by the asset ID of the banner in double quotes.
  50.         -- 6. The asset ID is http://www.roblox.com/asset/?id= followed by the number at the end of the banner's URL subtracted by 1.
  51.         -- 7. So if the number at the end of the URL is 12345678, the asset ID is http://www.roblox.com/asset/?id=12345677.
  52.         -- 8. Then type a closing parenthesis, i.e. ).
  53.         -- 9. Keep doing all of that until you've finished.
  54.         -- 10. If you set imageOrText to text, skip steps 4-9.
  55.         --
  56.         -- Here's an example for if you set imageOrText to image:
  57.         banner(player, 1034265, "Marine", "http://www.roblox.com/asset/?id=144554819")
  58.         banner(player, 1034265, "Corporal", "http://www.roblox.com/asset/?id=144554867")
  59.         banner(player, 1034265, "Sergeant", "http://www.roblox.com/asset/?id=144554871")
  60.         banner(player, 1034265, "Colour Sergeant", "http://www.roblox.com/asset/?id=144554882")
  61.         banner(player, 1034265, "Sergeant Major", "http://www.roblox.com/asset/?id=144554901")
  62.         banner(player, 1034265, "Warrant Officer", "http://www.roblox.com/asset/?id=144554910")
  63.         banner(player, 1034265, "Second Lieutenant", "http://www.roblox.com/asset/?id=144554935")
  64.         banner(player, 1034265, "Lieutenant", "http://www.roblox.com/asset/?id=144554948")
  65.         banner(player, 1034265, "Major", "http://www.roblox.com/asset/?id=144554956")
  66.         banner(player, 1034265, "Lieutenant Colonel", "http://www.roblox.com/asset/?id=144554971")
  67.         banner(player, 1034265, "Colonel", "http://www.roblox.com/asset/?id=144554987")
  68.         banner(player, 1034265, "Brigadier General", "http://www.roblox.com/asset/?id=144555002")
  69.         banner(player, 1034265, "Major General", "http://www.roblox.com/asset/?id=144555008")
  70.         banner(player, 1034265, "Lieutenant General", "http://www.roblox.com/asset/?id=144555034")
  71.         banner(player, 1034265, "General David Sawyer", "http://www.roblox.com/asset/?id=144555042")
  72.         banner(player, 1034265, "First Lord of TGNB Sylus Pellew", "http://www.roblox.com/asset/?id=144555046")
  73.         -- Through that example, if the player is a Member in the official Roblox group, they receive a Builders Club banner.
  74.         -- If they are an Admin in the Roblox group, however, they receive an Outraegous Builders Club banner.
  75.         -- And if they are a Writer in the ROBLOX Wiki Staff group, they receive a "Welcome To The Wiki" banner.
  76.         --
  77.         -- Here's an example for if you set textOrImage to text:
  78.         -- banner(player, 7)
  79.         -- Through that example, text will above the player's head saying what the player's rank is in the official ROBLOX group.
  80.         --
  81.         -- Change and add on to those to fit your own needs.
  82.     end)
  83. end)
Advertisement
Add Comment
Please, Sign In to add comment