Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local model = Instance.new("Model", script)
- model.Name = "Mad Deaky"
- local humfake = Instance.new("Humanoid", model)
- humfake.MaxHealth = 1000
- humfake.Health = 1000
- local part1 = Instance.new("Part", model)
- part1.Shape = Enum.PartType.Ball
- part1.Size = Vector3.new(15, 15, 15)
- part1.Name = "Head"
- local decal = Instance.new("Decal", part1)
- local billboard = Instance.new("BillboardGui", part1)
- billboard.Adornee = part1
- billboard.StudsOffset = Vector3.new(-1, 18, 0)
- billboard.Size = UDim2.new(2,0,1,0)
- billboard.Name = "healthbarlol"
- local text = Instance.new("TextBox", billboard)
- text.BackgroundTransparency = 1
- text.TextTransparency = 0
- text.TextSize = 25
- text.Size = billboard.Size
- text.Font = "Arcade"
- decal.Face = Enum.NormalId.Front
- local happyFace = "http://www.roblox.com/asset/?id=7174894082"
- decal.Texture = happyFace
- part1.Material = "Slate"
- part1.Color = Color3.fromRGB(148, 43, 19)
- local bg = Instance.new("BodyGyro",part1)
- bg.D = 1250
- bg.P = 10000
- bg.MaxTorque = Vector3.new(400000, 400000, 400000)
- function move(target)
- local dir = (target.Position - part1.Position).unit
- local spawnPos = part1.Position
- local pos = spawnPos + (dir * 1)
- bg.cframe = CFrame.new(pos, pos + dir)
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= model) then
- temp = temp2:findFirstChild("Head")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- coroutine.wrap(function()
- while true do
- local torso = findNearestTorso(part1.Position)
- if torso~=nil then
- move(torso)
- end
- task.wait()
- end
- end)()
- function isplatformstand(PC)
- coroutine.wrap(function()
- PC.Character.Humanoid.PlatformStand = true
- wait(3)
- for i,v in pairs(PC.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- v.Enabled = true
- end
- end
- PC.Character.Humanoid.PlatformStand = false
- end)()
- end
- local debris = game:GetService("Debris")
- function killfunction(part)
- local Model = part:FindFirstAncestorOfClass("Model")
- if Model then
- local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if PC then
- local limbcollider = Instance.new("Part", PC.Character:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = PC.Character:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider2 = Instance.new("Part", PC.Character:findFirstChild("Left Arm"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Shape = "Cylinder"
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider)
- limbcolliderweld2.Part0 = PC.Character:findFirstChild("Left Arm")
- limbcolliderweld2.Part1 = limbcollider2
- limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider3 = Instance.new("Part", PC.Character:findFirstChild("Right Leg"))
- limbcollider3.Size = Vector3.new(1.3,1,1)
- limbcollider3.Shape = "Cylinder"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld3 = Instance.new("Weld", limbcollider)
- limbcolliderweld3.Part0 = PC.Character:findFirstChild("Right Leg")
- limbcolliderweld3.Part1 = limbcollider3
- limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider4 = Instance.new("Part", PC.Character:findFirstChild("Left Leg"))
- limbcollider4.Size = Vector3.new(1.3,1,1)
- limbcollider4.Shape = "Cylinder"
- limbcollider4.Transparency = 1
- limbcollider4.Name = "LimbCollider"
- local limbcolliderweld4 = Instance.new("Weld", limbcollider)
- limbcolliderweld4.Part0 = PC.Character:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- debris:AddItem(limbcollider, 3)
- debris:AddItem(limbcollider2, 3)
- debris:AddItem(limbcollider3, 3)
- debris:AddItem(limbcollider4, 3)
- isplatformstand(PC)
- for i,v in pairs(PC.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = v.Part0
- a2.Parent = v.Part1
- Socket.Parent = v.Parent
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = v.C0
- a2.CFrame = v.C1
- Socket.LimitsEnabled = true
- Socket.TwistLimitsEnabled = true
- v.Enabled = false
- debris:AddItem(a1, 3)
- debris:AddItem(a2, 3)
- debris:AddItem(Socket, 3)
- end
- end
- end
- end
- end
- local db = false
- Bullet = Instance.new("Part", owner.Character)
- Bullet.Position = Vector3.new(1000000,1000000,1000000)
- Bullet.Anchored = true
- Bullet.CanCollide = false
- Bullet.BrickColor = BrickColor.new("Bright yellow")
- while true do
- task.wait()
- text.Text = "Health: "..humfake.Health.."/1000"
- if humfake.Health <= 0 then
- model:Destroy()
- script:Destroy()
- else
- end
- wait(2.5)
- local origin = part1.Position
- local position = part1.CFrame.lookVector * 300
- local direction = (position - origin).Unit*300
- local result = game.Workspace:Raycast(origin, direction)
- local intersection = result and result.Position or origin + direction
- local distance = (origin - intersection).Magnitude + 2.5
- local bullet_clone = Bullet:Clone()
- bullet_clone.Size = Vector3.new(1.25, 1.25, distance)
- bullet_clone.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
- bullet_clone.Parent = game.Workspace
- if result then
- local part = result.Instance
- wait(0.1)
- killfunction(part)
- local humanoid = part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Health = humanoid.Health - 45
- local velocity = Instance.new("BodyVelocity", part)
- velocity.Velocity = bullet_clone.CFrame.lookVector * 20
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(0.125)
- velocity:Destroy()
- velocity = nil
- end
- end
- wait(0.25)
- bullet_clone:Destroy()
- if not db then
- db = true
- part1.CFrame = part1.CFrame * CFrame.new(math.random(-25,25),0,math.random(-25,25))
- wait(0.1)
- db = false
- end
- end
Add Comment
Please, Sign In to add comment