SebTDZ

Untitled

Aug 14th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.93 KB | None | 0 0
  1. function rgb(RED,GREEN,BLUE)
  2.     local Count = 1 / 255
  3.     --Red Count
  4.     local red = Count * RED
  5.     --Green Count
  6.     local green = Count * GREEN
  7.     --Blue Count
  8.     local blue = Count * BLUE
  9.     --Give Color3
  10.     local FColor = Color3.new(red,green,blue)
  11.     return FColor
  12. end
  13.  
  14. owner.Character.Humanoid:RemoveAccessories()
  15.  
  16. local AdminHat = Instance.new("Model", owner.Character)
  17. AdminHat.Name = "AdminHat"
  18.  
  19. local HatMain = Instance.new("Part", AdminHat)
  20. HatMain.Name = "HatMain"
  21. HatMain.Color = rgb(0, 180, 245)
  22. HatMain.Size = Vector3.new(0.8,1.25,1.25)
  23. HatMain.Position = Vector3.new(0,5,0)
  24. HatMain.Rotation = Vector3.new(0, 0, 90)
  25. HatMain.CanCollide = true
  26. HatMain.Anchored = true
  27. HatMain.Shape = Enum.PartType.Cylinder
  28. HatMain.TopSurface = Enum.SurfaceType.Smooth
  29. HatMain.BottomSurface = Enum.SurfaceType.Smooth
  30.  
  31. local HatBand = Instance.new("Part", AdminHat)
  32. HatBand.Name = "HatBand"
  33. HatBand.Color = rgb(245, 235, 5)
  34. HatBand.Size = Vector3.new(0.1,1.3,1.3)
  35. HatBand.Position = Vector3.new(0,(5 - 0.8) + 0.5 ,0)
  36. HatBand.Rotation = Vector3.new(0, 0, 90)
  37. HatBand.CanCollide = true
  38. HatBand.Anchored = true
  39. HatBand.Shape = Enum.PartType.Cylinder
  40. HatBand.TopSurface = Enum.SurfaceType.Smooth
  41. HatBand.BottomSurface = Enum.SurfaceType.Smooth
  42.  
  43. local HatBottom = Instance.new("Part", AdminHat)
  44. HatBottom.Name = "HatBottom"
  45. HatBottom.Color = rgb(0, 180, 245)
  46. HatBottom.Size = Vector3.new(0.1,2,2)
  47. HatBottom.Position = Vector3.new(0,(5 - 0.8) + 0.35 ,0)
  48. HatBottom.Rotation = Vector3.new(0, 0, 90)
  49. HatBottom.CanCollide = true
  50. HatBottom.Anchored = true
  51. HatBottom.Shape = Enum.PartType.Cylinder
  52. HatBottom.TopSurface = Enum.SurfaceType.Smooth
  53. HatBottom.BottomSurface = Enum.SurfaceType.Smooth
  54.  
  55. local PrimaryPart = HatMain
  56. local Parts = {HatBand,HatBottom}
  57. local Parts2 = {HatMain,HatBand,HatBottom}
  58. for i = 1, #Parts do
  59.     if Parts[i]:IsA('BasePart') then
  60.         local weld = Instance.new("Weld")
  61.         weld.Part0 = PrimaryPart
  62.         weld.Part1 = Parts[i]
  63.         weld.C0 = PrimaryPart.CFrame:inverse()
  64.         weld.C1 = Parts[i].CFrame:inverse()
  65.         weld.Parent = PrimaryPart
  66.     end
  67. end
  68. for i,v in pairs(Parts2) do
  69.     v.Anchored = false
  70.     v.Material = "SmoothPlastic"
  71. end
  72.  
  73. local weld = Instance.new("Weld")
  74. weld.Part0 = owner.Character.Head
  75. weld.Part1 = PrimaryPart
  76. weld.C0 = CFrame.new(0,-4.1,0)
  77. weld.C1 = PrimaryPart.CFrame:inverse()
  78. weld.Parent = PrimaryPart
  79.  
  80. local Music = Instance.new("Sound", HatBottom)
  81. Music.SoundId = "rbxassetid://" .. 1092048938
  82. Music.Volume = 1
  83. Music.Looped = true
  84. Music:Play()
  85.  
  86. local ScreenGui = Instance.new("ScreenGui",owner.PlayerGui)
  87. ScreenGui.Name = "TrueAdmin"
  88.  
  89. local Frame = Instance.new("Frame",ScreenGui)
  90. Frame.Position = UDim2.new(2,0,0.1,0)
  91. Frame.Size = UDim2.new(0.1,0,0.8,0)
  92. Frame.BackgroundColor3 = Color3.new(0.5,0.5,0.5)
  93.  
  94. local StartUp = game.TweenService:Create(Frame, TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Position = UDim2.new(1 - 0.1,0,0.1,0)})
  95. StartUp:Play()
Advertisement
Add Comment
Please, Sign In to add comment