Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService('Players')
- local LocalPlayer = Players.LocalPlayer
- local Assets = game:GetObjects('rbxassetid://4937866588')[1]
- local Instances = Assets.Instances
- local Gui = Assets.ScreenGui
- local Main = Gui.Frame
- Gui.Parent = game.CoreGui
- for Transparency = 1.05, -0.05, -0.05 do Main.Loading.ImageLabel.ImageTransparency = Transparency game:GetService('RunService').RenderStepped:wait()end wait(1)
- spawn(function()for Transparency = 0, 1.05, 0.05 do Main.Loading.ImageLabel.ImageTransparency = Transparency game:GetService('RunService').RenderStepped:wait() end end)
- 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)
- Main:Destroy()
- function onCharacterAdded(Player)
- if Gui:FindFirstChild(Player.Name) then
- Gui[Player.Name]:ClearAllChildren()
- end
- repeat game:GetService('RunService').RenderStepped:wait() until Player.Character -- Yield until their character has loaded
- local Folder = Gui:FindFirstChild(Player.Name) or Instances.Folder:Clone()
- 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 {}
- Folder.Name = Player.Name
- for i, Limb in pairs(Limb_Set) do
- if Player.Character[Limb] then
- local Box = Instances:WaitForChild("BoxHandleAdornment"):Clone()
- Box.Color3 = Player.TeamColor.Color
- Box.Transparency = .5
- Box.Adornee = Player.Character[Limb]
- Box.AlwaysOnTop = true
- Box.Name = Limb
- Box.Size = Player.Character[Limb].Size
- Box.Visible = true
- Box.ZIndex = 1
- Box.Parent = Folder
- end
- end
- Folder.Parent = Gui
- end
- function onCharacterRemoving(Player)
- if Gui:FindFirstChild(Player.Name) then
- Gui[Player.Name]:Destroy()
- end
- end
- function onPlayerAdded(Player)
- if Player.Character then onCharacterAdded(Player) end
- Player.CharacterAdded:connect(function() onCharacterAdded(Player) end)
- Player.CharacterRemoving:connect(function() onCharacterRemoving(Player) end)
- Player:GetPropertyChangedSignal("TeamColor"):connect(function()
- if Gui:FindFirstChild(Player.Name) then
- for i, Box in pairs(Gui[Player.Name]:GetChildren()) do
- Box.Color3 = Player.TeamColor.Color
- end
- end
- end)
- end
- function onPlayerRemoving(Player)
- onCharacterRemoving(Player)
- end
- for i, Player in pairs(Players:GetPlayers()) do if Player ~= LocalPlayer then onPlayerAdded(Player) end end
- Players.PlayerAdded:connect(onPlayerAdded)
- Players.PlayerRemoving:connect(onPlayerRemoving)
Advertisement
Add Comment
Please, Sign In to add comment