Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [ VARS ]
- local players = game:GetService('Players')
- local lplayer = players.LocalPlayer
- local character = lplayer.Character
- local playergui = lplayer.PlayerGui
- repeat wait() until playergui:FindFirstChild('timeLeftGui')
- local gui = game:GetObjects("rbxassetid://03016520245")[1]
- gui.Parent = lplayer.PlayerGui
- local tab = gui.Frame.ScrollingFrame.Frame
- -- [ FUNCTIONS ]
- function updateSpell(newtab,player)
- wait(1)
- newtab.cd1.cdtime.TextColor3 = Color3.fromRGB(255,255,255)
- newtab.cd2.cdtime.TextColor3 = Color3.fromRGB(255,255,255)
- newtab.cd1.cdtime.BackgroundTransparency = 1
- newtab.cd2.cdtime.BackgroundTransparency = 1
- for _,spell in pairs(player.Backpack:GetChildren()) do
- if spell.abilitySlot.Value == "q" then
- newtab.cd1.Image = spell.imageId.Value
- spell.cooldown.Changed:connect(function()
- newtab.cd1.cdtime.Text = math.floor(spell.cooldown.Value)
- if spell.cooldown.Value <= .1 then
- newtab.cd1.cdtime.Visible = false
- else
- newtab.cd1.cdtime.Visible = true
- end
- end)
- elseif spell.abilitySlot.Value == "e" then
- newtab.cd2.Image = spell.imageId.Value
- spell.cooldown.Changed:connect(function()
- newtab.cd2.cdtime.Text = math.floor(spell.cooldown.Value)
- if spell.cooldown.Value <= .1 then
- newtab.cd2.cdtime.Visible = false
- else
- newtab.cd2.cdtime.Visible = true
- end
- end)
- end
- end
- end
- function updateBar(bar,player)
- local msize = 236
- local oldColor = Color3.fromRGB(99, 255, 75)
- local humanoid = player.Character.Humanoid
- local health = player.Character.Humanoid.Health
- local max = player.Character.Humanoid.MaxHealth
- local max = player.Character.Humanoid.MaxHealth
- local percent = (health/max)
- local newval = percent*msize
- bar.BackgroundColor3 = Color3.fromRGB(245,255,231)
- wait(.1)
- bar.BackgroundColor3 = oldColor
- bar.Size = UDim2.new(0,newval,0,25)
- end
- -- [ INITIAL SETUP ]
- playergui.playerStatus.Frame.teammateHolder.Visible = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement