SKIDNOOB

BODDY

Apr 24th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. local Players = game:GetService('Players')
  2. local LocalPlayer = Players.LocalPlayer
  3. local Assets = game:GetObjects('rbxassetid://4937866588')[1]
  4. local Instances = Assets.Instances
  5. local Gui = Assets.ScreenGui
  6. local Main = Gui.Frame
  7.  
  8. Gui.Parent = game.CoreGui
  9.  
  10. for Transparency = 1.05, -0.05, -0.05 do Main.Loading.ImageLabel.ImageTransparency = Transparency game:GetService('RunService').RenderStepped:wait()end wait(1)
  11. spawn(function()for Transparency = 0, 1.05, 0.05 do Main.Loading.ImageLabel.ImageTransparency = Transparency game:GetService('RunService').RenderStepped:wait() end end)
  12. for Frame = 1, 10 do Main.Loading['Frame'..Frame]:TweenSizeAndPosition(UDim2.new(0,0,0,20),UDim2.new(1,0,0,Main.Loading['Frame'..Frame].Position.Y.Offset),Enum.EasingDirection.Out,Enum.EasingStyle.Sine,.6)wait(0.2)end wait(.5)
  13. Main:Destroy()
  14.  
  15. function onCharacterAdded(Player)
  16. if Gui:FindFirstChild(Player.Name) then
  17. Gui[Player.Name]:ClearAllChildren()
  18. end
  19. repeat game:GetService('RunService').RenderStepped:wait() until Player.Character -- Yield until their character has loaded
  20. local Folder = Gui:FindFirstChild(Player.Name) or Instances.Folder:Clone()
  21. local Limb_Set = (Player.Character:FindFirstChild('Torso') and {"Head","Torso","Left Arm","Right Arm","Left Leg", "Right Leg"}) or (Player.Character:FindFirstChild("UpperTorso") and {'Head','UpperTorso','LowerTorso','LeftUpperArm','LeftLowerArm','LeftHand','RightUpperArm','RightLowerArm','RightHand','LeftUpperLeg','LeftLowerLeg','LeftFoot','RightUpperLeg','RightLowerLeg','RightFoot'}) or {}
  22. Folder.Name = Player.Name
  23. for i, Limb in pairs(Limb_Set) do
  24. if Player.Character[Limb] then
  25. local Box = Instances:WaitForChild("BoxHandleAdornment"):Clone()
  26. Box.Color3 = Player.TeamColor.Color
  27. Box.Transparency = .5
  28. Box.Adornee = Player.Character[Limb]
  29. Box.AlwaysOnTop = true
  30. Box.Name = Limb
  31. Box.Size = Player.Character[Limb].Size
  32. Box.Visible = true
  33. Box.ZIndex = 1
  34. Box.Parent = Folder
  35. end
  36. end
  37. Folder.Parent = Gui
  38. end
  39.  
  40. function onCharacterRemoving(Player)
  41. if Gui:FindFirstChild(Player.Name) then
  42. Gui[Player.Name]:Destroy()
  43. end
  44. end
  45.  
  46. function onPlayerAdded(Player)
  47. if Player.Character then onCharacterAdded(Player) end
  48. Player.CharacterAdded:connect(function() onCharacterAdded(Player) end)
  49. Player.CharacterRemoving:connect(function() onCharacterRemoving(Player) end)
  50. Player:GetPropertyChangedSignal("TeamColor"):connect(function()
  51. if Gui:FindFirstChild(Player.Name) then
  52. for i, Box in pairs(Gui[Player.Name]:GetChildren()) do
  53. Box.Color3 = Player.TeamColor.Color
  54. end
  55. end
  56. end)
  57. end
  58.  
  59. function onPlayerRemoving(Player)
  60. onCharacterRemoving(Player)
  61. end
  62.  
  63. for i, Player in pairs(Players:GetPlayers()) do if Player ~= LocalPlayer then onPlayerAdded(Player) end end
  64. Players.PlayerAdded:connect(onPlayerAdded)
  65. Players.PlayerRemoving:connect(onPlayerRemoving)
Advertisement
Add Comment
Please, Sign In to add comment