Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- NOTE: This script was created by ElectricBlaze, Scripting Tier-3 in Scripting Helpers, ex-Writer in LuaLearners, and Writer on the ROBLOX Wiki.
- --
- -- This script allows users to give each player a different banner over their heads depending on their role in a group.
- -- The banner must be a decal that was already created.
- -- The script will follow. Please read EVERYTTHING carefully.
- -- The instructions will be near the end of the script.
- -- There is only one editble thing you must do.
- --
- local imageOrText = "image"
- --
- -- 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.
- --
- -- Do not edit below.
- --
- function banner(player, group, role, image)
- role = role or ""
- image = image or ""
- local gui = Instance.new("BillboardGui", player.Character.Head)
- gui.Adornee = player.Character.Head
- gui.Size = UDim2.new(2, 0, 3, 0)
- gui.StudsOffset = Vector3.new(0.2, 1, 0)
- if imageOrText:lower() == "image" then
- if player:GetRoleInGroup(group) == role then
- local il = Instance.new("ImageLabel", gui)
- il.Image = image
- il.Size = UDim2.new(1, 0, 0.75, 0)
- il.Position = UDim2.new(-0.125, 0, -0.25, 0)
- il.BackgroundTransparency = 1
- end
- elseif imageOrText:lower() == "text" then
- local tl = Instance.new("TextLabel", gui)
- tl.Text = player:GetRoleInGroup(group)
- tl.TextColor3 = Color3.new(0, 0, 0)
- tl.Font = "ArialBold"
- tl.TextScaled = true
- tl.Size = UDim2.new(1, 0, 0.75, 0)
- tl.Position = UDim2.new(-0.125, 0, -0.25, 0)
- tl.BackgroundTransparency = 1
- end
- end
- --
- game.Players.PlayerAdded:connect(function(player)
- player.CharacterAdded:connect(function(char)
- -- Here is where your instructions begin.
- -- 1. First type the word banner, followed by opening parenthesis, i.e. (.
- -- 2. Then type a comma, followed by the word "player", followed by another comma.
- -- 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.
- -- 4. Then type another comma, followed by the name of the role you're checking from, in double quotes, i.e. "".
- -- 5. Then type another comma, followed by the asset ID of the banner in double quotes.
- -- 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.
- -- 7. So if the number at the end of the URL is 12345678, the asset ID is http://www.roblox.com/asset/?id=12345677.
- -- 8. Then type a closing parenthesis, i.e. ).
- -- 9. Keep doing all of that until you've finished.
- -- 10. If you set imageOrText to text, skip steps 4-9.
- --
- -- Here's an example for if you set imageOrText to image:
- banner(player, 1034265, "Marine", "http://www.roblox.com/asset/?id=144554819")
- banner(player, 1034265, "Corporal", "http://www.roblox.com/asset/?id=144554867")
- banner(player, 1034265, "Sergeant", "http://www.roblox.com/asset/?id=144554871")
- banner(player, 1034265, "Colour Sergeant", "http://www.roblox.com/asset/?id=144554882")
- banner(player, 1034265, "Sergeant Major", "http://www.roblox.com/asset/?id=144554901")
- banner(player, 1034265, "Warrant Officer", "http://www.roblox.com/asset/?id=144554910")
- banner(player, 1034265, "Second Lieutenant", "http://www.roblox.com/asset/?id=144554935")
- banner(player, 1034265, "Lieutenant", "http://www.roblox.com/asset/?id=144554948")
- banner(player, 1034265, "Major", "http://www.roblox.com/asset/?id=144554956")
- banner(player, 1034265, "Lieutenant Colonel", "http://www.roblox.com/asset/?id=144554971")
- banner(player, 1034265, "Colonel", "http://www.roblox.com/asset/?id=144554987")
- banner(player, 1034265, "Brigadier General", "http://www.roblox.com/asset/?id=144555002")
- banner(player, 1034265, "Major General", "http://www.roblox.com/asset/?id=144555008")
- banner(player, 1034265, "Lieutenant General", "http://www.roblox.com/asset/?id=144555034")
- banner(player, 1034265, "General David Sawyer", "http://www.roblox.com/asset/?id=144555042")
- banner(player, 1034265, "First Lord of TGNB Sylus Pellew", "http://www.roblox.com/asset/?id=144555046")
- -- Through that example, if the player is a Member in the official Roblox group, they receive a Builders Club banner.
- -- If they are an Admin in the Roblox group, however, they receive an Outraegous Builders Club banner.
- -- And if they are a Writer in the ROBLOX Wiki Staff group, they receive a "Welcome To The Wiki" banner.
- --
- -- Here's an example for if you set textOrImage to text:
- -- banner(player, 7)
- -- Through that example, text will above the player's head saying what the player's rank is in the official ROBLOX group.
- --
- -- Change and add on to those to fit your own needs.
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment