Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(1)
- local damage = {}
- function damage.Ready()
- game:WaitForChild("ServerStorage")
- local dmgbil = Instance.new("BillboardGui")
- dmgbil.Parent = game.ServerStorage
- dmgbil.Name = "damageind"
- dmgbil.Size = UDim2.new(5,10,1,2)
- dmgbil.Active = true
- dmgbil.AlwaysOnTop = true
- dmgbil.Enabled = true
- local dmglabel = Instance.new("TextLabel")
- dmglabel.BackgroundTransparency = 1
- dmglabel.BackgroundColor3 = Color3.fromRGB(255,255,255)
- dmglabel.TextColor3 = Color3.fromRGB(255,255,255)
- dmglabel.TextScaled = true
- dmglabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
- dmglabel.TextStrokeTransparency = 0.4
- dmglabel.Size = UDim2.new(1,0,1,0)
- dmglabel.Parent = dmgbil
- local healbil = Instance.new("BillboardGui")
- healbil.Parent = game.ServerStorage
- healbil.Name = "healind"
- healbil.Size = UDim2.new(5,10,1,2)
- healbil.Active = true
- healbil.AlwaysOnTop = true
- healbil.Enabled = true
- local heallabel = Instance.new("TextLabel")
- heallabel.BackgroundTransparency = 1
- heallabel.BackgroundColor3 = Color3.fromRGB(255,255,255)
- heallabel.TextColor3 = Color3.fromRGB(0,255,0)
- heallabel.TextScaled = true
- heallabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
- heallabel.TextStrokeTransparency = 0.4
- heallabel.Size = UDim2.new(1,0,1,0)
- heallabel.Parent = healbil
- end
- function damage.DealDamage(model, amount)
- game:WaitForChild("ServerStorage")
- model.Humanoid:TakeDamage(amount)
- local bbg = game.ServerStorage.damageind:Clone()
- bbg.ExtentsOffset = Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2))
- local text = bbg.TextLabel
- text.Text = math.floor(amount + 0.5)
- bbg.Parent = model.PrimaryPart
- game:GetService("Debris"):AddItem(bbg,0.7)
- game:GetService("TweenService"):Create(bbg, TweenInfo.new(1.5), {ExtentsOffset = Vector3.new(bbg.ExtentsOffset.X,5,bbg.ExtentsOffset.Z)}):Play()
- end
- function damage.HealDamage(model, amount)
- wait()
- game:WaitForChild("ServerStorage")
- model.Humanoid.Health = model.Humanoid.Health + amount
- local bbg = game.ServerStorage.healind:Clone()
- bbg.ExtentsOffset = Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2))
- local text = bbg.TextLabel
- text.Text = math.floor(amount + 0.5)
- bbg.Parent = model.PrimaryPart
- game:GetService("Debris"):AddItem(bbg,2)
- game:GetService("TweenService"):Create(bbg, TweenInfo.new(1.5), {ExtentsOffset = Vector3.new(bbg.ExtentsOffset.X,5,bbg.ExtentsOffset.Z)}):Play()
- end
- return damage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement