Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mesh = "rbxassetid://1990230124"
- texture = "rbxassetid://1990230137"
- face = "http://www.roblox.com/asset/?id=25766289"
- scale = 0.35
- dmg = 0
- max = 5000000
- health = 999
- high = false
- meghigh = false
- local plr = owner
- local char = plr.Character
- --local root = char.HumanoidRootPart
- local root = char.Torso
- local sandbag = Instance.new("SpecialMesh",root)
- sandbag.MeshId = mesh
- sandbag.TextureId = texture
- sandbag.Scale = Vector3.new(scale, scale, scale)
- for _,v in pairs (char:children()) do
- if v:IsA("Part") then
- v.Transparency = 1
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v:Destroy()
- end
- end
- local h = char.Humanoid
- h.MaxHealth = health
- h.Health = health
- h.Animator:Destroy()
- local hp = h.Health
- Debris = game:GetService("Debris")
- function swait(num)
- if num == 0 or num == nil then
- game:service("RunService").Stepped:wait(0)
- else
- for i = 0, num do
- game:service("RunService").Stepped:wait(0)
- end
- end
- end
- ezweld = function(p, a, b, cf)
- local weld = Instance.new("Weld",p)
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = cf
- return weld
- end
- local rootj = ezweld(root, root, char.HumanoidRootPart, CFrame.new())
- local sur = Instance.new("BillboardGui", char.Head)
- sur.Name = "Billboard"
- sur.Adornee = char.Head
- sur.Size = UDim2.new(10, 0, 5, 0)
- sur.StudsOffset = Vector3.new(0, 3.5, 0)
- local text = Instance.new("TextBox", sur)
- text.Text = dmg .."%"
- text.Size = UDim2.new(1, 0, 1, 0)
- text.TextScaled = true
- text.BackgroundTransparency = 1
- text.Font = Enum.Font.SourceSansLight
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextStrokeTransparency = 0
- NewSound = function(p, id, pit, vol, loop)
- local Sound = Instance.new("Sound",p)
- Sound.Pitch = pit
- Sound.Volume = vol
- Sound.SoundId = "rbxassetid://" ..id
- Sound.Looped = loop
- Sound:Play()
- return Sound
- end
- function HealthChanged()
- if h.Health < hp then
- if h.Health > 0 then
- dmg = dmg + 5
- if dmg < 50 and high == false and meghigh == false then
- NewSound(root, 260430060, 1, 10, false)
- end
- if dmg > 49 and high == true and meghigh == false then
- NewSound(root, 260430079, 1, 10, false)
- end
- if dmg > 99 and high == true and meghigh == true then
- NewSound(root, 260430117, 1, 10, false)
- end
- for i = 1,dmg / 2 do
- swait()
- rootj.C0 = rootj.C0 * CFrame.Angles(dmg / 7, 0 ,0)
- root.Anchored = true
- root.CFrame = root.CFrame * CFrame.new(0, 0.35 * dmg / 5, 0.35)
- end
- rootj.C0 = CFrame.new()
- root.Anchored = false
- end
- end
- hp = h.Health
- end
- h.HealthChanged:Connect(HealthChanged)
- function reset()
- dmg = 0
- text.TextColor3 = Color3.new(1, 1, 1)
- end
- plr.Chatted:connect(function(msg)
- if msg == "!reset" then
- reset()
- end
- if msg:sub(1, 4) == "!dmg" then
- dmg = dmg + msg:sub(6)
- end
- end)
- spawn(function()
- swait()
- root.Transparency = 0
- sandbag.MeshId = mesh
- sandbag.TextureId = texture
- sandbag.Scale = Vector3.new(scale, scale, scale)
- --decal.Texture = face
- --decal.Face = "Top"
- end)
- while true do
- swait()
- text.Text = dmg .."%"
- if dmg > 49 and high == false and meghigh == false then
- high = true
- meghigh = false
- text.TextColor3 = BrickColor.new("Neon orange").Color
- end
- if dmg > 99 and high == true and meghigh == false then
- high = false
- meghigh = true
- text.TextColor3 = BrickColor.new("Really red").Color
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement