Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local FakeChar = char
- local Humanoid = char.Humanoid
- local hum = char.Humanoid
- local tors = char.Torso
- local root = char.HumanoidRootPart
- local ra = char["Right Arm"]
- local la = char["Left Arm"]
- local rl = char["Right Leg"]
- local ll = char["Left Leg"]
- local RightLeg = rl
- local LeftLeg = ll
- local Torso = tors
- local Bump = 0
- local Direction = "Idle"
- local Mid = 0.7
- local HP = 5
- local LandTimer = 4
- local Bla = false
- local Disable = false
- local Stuck = 25
- local FallTimer = 0
- local EmoteTimer = 0
- for _,v in pairs (char:children()) do
- if v:IsA("Part") then
- v.Anchored = true
- end
- end
- hum:SetStateEnabled("Dead", false)
- hum.WalkSpeed = 0
- function NearNumber(a,b)
- if a + 0.375 >= b and a - 0.375 <= b then
- return true
- else
- return false
- 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 rl2 = Instance.new("Part",char)
- rl2.Name = "RL"
- rl2.Anchored = false
- rl2.Position = rl.Position
- rl2.Orientation = rl.Orientation
- rl2.Size = rl.Size
- local rl2j = ezweld(char, rl, rl2, CFrame.new())
- local ll2 = Instance.new("Part",char)
- ll2.Name = "LL"
- ll2.Anchored = false
- ll2.Position = ll.Position
- ll2.Orientation = ll.Orientation
- ll2.Size = ll.Size
- local rl2j = ezweld(char, ll, ll2, CFrame.new())
- ]]--
- local SoundA = Instance.new("Sound",script)
- SoundA.SoundId = "rbxasset://sounds/bass.mp3"
- SoundA.Volume = 0.35
- local SoundB = Instance.new("Sound",script)
- SoundB.SoundId = "rbxasset://sounds/electronicpingshort.wav"
- SoundB.Volume = 0.35
- local SoundC = Instance.new("Sound",script)
- SoundC.SoundId = "rbxasset://sounds/snap.mp3"
- SoundC.Volume = 0.35
- function HitSound()
- for i = 1,10 do
- if SoundC and SoundC.Parent then
- SoundC.PlaybackSpeed = 1.5 - i * 0.1
- SoundC.TimePosition = 0.2
- SoundC:Play()
- end
- wait(0.04)
- end
- if SoundC and SoundC.Parent then
- SoundC:Stop()
- end
- end
- function BANG()
- for i = 1,2 do
- SoundC.PlaybackSpeed = 0.8
- SoundC.TimePosition = 0.2
- SoundC:Play()
- wait(0.06)
- end
- for i = 1,10 do
- if SoundC and SoundC.Parent then
- SoundC.PlaybackSpeed = 0.325 - i * 0.02
- SoundC.TimePosition = 0.2
- SoundC:Play()
- end
- wait(0.06)
- end
- if SoundC and SoundC.Parent then
- SoundC:Stop()
- end
- end
- function Kaboom()
- for i = 1,30 do
- if SoundC and SoundC.Parent then
- SoundC.PlaybackSpeed = 0.6 - i * 0.015
- SoundC.TimePosition = 0.2
- SoundC:Play()
- end
- wait(0.06)
- end
- if SoundC and SoundC.Parent then
- SoundC:Stop()
- end
- end
- function OW()
- for i = 1,3 do
- if SoundA then
- SoundA.PlaybackSpeed = 9 + i * 0.3
- SoundA.TimePosition = 0.2
- SoundA:Play()
- end
- wait(0.04)
- end
- for i = 1,4 do
- if SoundA then
- SoundA.PlaybackSpeed = 9.75 - i * 0.6
- SoundA.TimePosition = 0.2
- SoundA:Play()
- end
- wait(0.04)
- end
- if SoundA then
- SoundA:Stop()
- end
- end
- function AOW()
- for i = 1,40 do
- local P = 2.5 + (i + 38) * 0.15
- if i > 8 then
- P = 9 - (i - 4) * 0.15
- end
- if SoundA then
- SoundA.PlaybackSpeed = P
- SoundA.TimePosition = 0.2
- SoundA:Play()
- end
- wait(0.04)
- end
- if SoundA then
- SoundA:Stop()
- end
- end
- function Collide()
- for i = 1,3 do
- if SoundC and SoundC.Parent then
- SoundC.PlaybackSpeed = 1
- SoundC.TimePosition = 0.2
- SoundC:Play()
- end
- wait(0.04)
- end
- if SoundC and SoundC.Parent then
- SoundC:Stop()
- end
- end
- function FallSound()
- for i = 1,30 do
- if SoundB and SoundB.Parent then
- SoundB.PlaybackSpeed = 3 - i * 0.15
- SoundB.TimePosition = 0.2
- SoundB:Play()
- end
- wait(0.06)
- end
- if SoundB and SoundB.Parent then
- SoundB:Stop()
- end
- end
- function RecoverSound()
- for i = 1,15 do
- if SoundB and SoundB.Parent then
- SoundB.PlaybackSpeed = i * 0.3
- SoundB.TimePosition = 0.2
- SoundB:Play()
- end
- wait(0.06)
- end
- if SoundB and SoundB.Parent then
- SoundB:Stop()
- end
- end
- function SwingSound()
- for i = 1,5 do
- if SoundC and SoundC.Parent then
- SoundC.PlaybackSpeed = 1 + i * 0.1
- SoundC.TimePosition = 0.2
- SoundC:Play()
- end
- wait(0.04)
- end
- if SoundC and SoundC.Parent then
- SoundC:Stop()
- end
- end
- function jointontors()
- char.Head.CFrame = tors.CFrame * CFrame.new(0, 1.5, 0)
- ra.CFrame = tors.CFrame * CFrame.new(1.5, 0, 0)
- la.CFrame = tors.CFrame * CFrame.new(-1.5, 0, 0)
- rl.CFrame = tors.CFrame * CFrame.new(0.5, -2, 0)
- ll.CFrame = tors.CFrame * CFrame.new(-0.5, -2, 0)
- root.CFrame = tors.CFrame
- end
- function NameMatch(a)
- local name = string.lower(a.Name)
- if name == "lava" or name == "hazard" or name == "spike" or name == "spikes" or name == "hurt" or name == "bomb" or name == "subspacetripmine" or name == "mine" or name == "damage" or name == "caltrop" or name == "acid" or name == "fire" or name == "ninjastickybomb" or name == "landmine" or name == "rocket" or name == "leftrocket" or name == "rightrocket" or name == "rocketclone" or name == "missile" or name == "hedgehog" or name == "blueblur" or name == "laser" or name == "kaboom" or name == "fusebomb" or name == "projectile" or name == "bullet" or name == "deadly" or name == "electric" or name == "electricity" or name == "flame" or name == "blade" or name == "sharp" or name == "explosion" then
- return true
- else
- return false
- end
- end
- Head = char.Head
- while true do
- wait()
- char:TranslateBy(hum.MoveDirection)
- tors.Orientation = Vector3.new(0, 90, 0)
- char.Head.CFrame = tors.CFrame * CFrame.new(0, 1.5, 0)
- jointontors()
- local Direction2 = hum.MoveDirection
- if HP > 0 and Humanoid.Jump and LandTimer > 0 and Bump <= 0 and (Direction == "Idle" or Disable == true) then
- Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y + 50,Torso.Velocity.Z)
- LandTimer = 1
- FakeChar:TranslateBy(Vector3.new(0,0.2,0))
- local TouchLeg = false
- local LT = LeftLeg:GetTouchingParts()
- for i = 1,#LT do
- if LT[i] and LT[i].Parent ~= FakeChar and LT[i].CanCollide then
- TouchLeg = true
- end
- end
- local RT = RightLeg:GetTouchingParts()
- for i = 1,#RT do
- if RT[i] and RT[i].Parent ~= FakeChar and RT[i].CanCollide then
- TouchLeg = true
- end
- end
- if TouchLeg == false then
- delay(0,function()
- SwingSound()
- end)
- end
- end
- if NearNumber(Direction2.X,1) and NearNumber(Direction2.Z,0) then
- Direction = "Right"
- jointontors()
- elseif NearNumber(Direction2.X,Mid) and NearNumber(Direction2.Z,Mid) then
- Direction = "DownRight"
- jointontors()
- elseif NearNumber(Direction2.X,0) and NearNumber(Direction2.Z,1) then
- Direction = "Down"
- jointontors()
- elseif NearNumber(Direction2.X,-Mid) and NearNumber(Direction2.Z,Mid) then
- Direction = "DownLeft"
- jointontors()
- elseif NearNumber(Direction2.X,-1) and NearNumber(Direction2.Z,0) then
- Direction = "Left"
- jointontors()
- elseif NearNumber(Direction2.X,-Mid) and NearNumber(Direction2.Z,-Mid) then
- Direction = "UpLeft"
- jointontors()
- elseif NearNumber(Direction2.X,0) and NearNumber(Direction2.Z,-1) then
- Direction = "Up"
- jointontors()
- elseif NearNumber(Direction2.X,Mid) and NearNumber(Direction2.Z,-Mid) then
- Direction = "UpRight"
- jointontors()
- end
- if HP <= 0 then
- Direction = "Idle"
- end
- local Mv = 0.75
- local Movements = 10
- if LandTimer < 0 then
- Mv = 0.97
- Movements = 7
- end
- if Disable == false and Direction ~= "Idle" and Humanoid.Jump then
- Bla = true
- end
- Torso.Velocity = Vector3.new(Torso.Velocity.X * Mv,Torso.Velocity.Y,Torso.Velocity.Z * Mv)
- jointontors()
- if Direction == "Right" then
- Torso.Orientation = Vector3.new(0,270,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(1,0,0) * Movements
- jointontors()
- end
- elseif Direction == "DownRight" then
- Torso.Orientation = Vector3.new(0,225,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(Mid,0,Mid) * Movements
- jointontors()
- end
- elseif Direction == "Down" then
- Torso.Orientation = Vector3.new(0,180,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(0,0,1) * Movements
- jointontors()
- end
- elseif Direction == "DownLeft" then
- Torso.Orientation = Vector3.new(0,135,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(-Mid,0,Mid) * Movements
- jointontors()
- end
- elseif Direction == "Left" then
- Torso.Orientation = Vector3.new(0,90,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(-1,0,0) * Movements
- jointontors()
- end
- elseif Direction == "UpLeft" then
- Torso.Orientation = Vector3.new(0,45,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(-Mid,0,-Mid) * Movements
- jointontors()
- end
- elseif Direction == "Up" then
- Torso.Orientation = Vector3.new(0,0,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(0,0,-1) * Movements
- jointontors()
- end
- elseif Direction == "UpRight" then
- Torso.Orientation = Vector3.new(0,315,0)
- if Bla == false and Bump <= 0 then
- Torso.Velocity = Torso.Velocity + Vector3.new(Mid,0,-Mid) * Movements
- jointontors()
- end
- end
- if LandTimer >= 0 or HP <= 0 then
- FallTimer = 0
- FallLoop = 0
- end
- LandTimer = LandTimer - 1
- EmoteTimer = EmoteTimer - 1
- local AlreadyCollided = false
- local HeadCollided = false
- local TorsoTouched = false
- for i = 1,20 do
- Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y - game.Workspace.Gravity * 0.002,Torso.Velocity.Z)
- local T = Torso:GetTouchingParts()
- for i = 1,#T do
- if T[i] and string.lower(T[i].Name) == "heal" and HP < 5 and HP > 0 then
- HP = 5
- delay(0,function()
- RecoverSound()
- end)
- end
- if T[i] and T[i].Parent ~= FakeChar and ((T[i].CanCollide or NameMatch(T[i])) or (T[i].Size.Magnitude < 10 and T[i]:FindFirstChildWhichIsA("TouchTransmitter") and T[i].Name ~= "T")) then
- if T[i].CanCollide then
- TorsoTouched = true
- end
- if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 32 then
- Bump = 16
- delay(0,function()
- Collide()
- end)
- if HP > 0 then
- delay(0,function()
- OW()
- end)
- end
- end
- if NameMatch(T[i]) or (T[i].Size.Magnitude < 10 and T[i]:FindFirstChildWhichIsA("TouchTransmitter") and T[i].Name ~= "T") or (T[i].Velocity - Torso.Velocity).Magnitude > 160 then
- Hit = true
- if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 160 then
- Bump = 35
- end
- end
- if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(T[i].Name) == "blade" then
- ExtraHit = true
- end
- if T[i].CanCollide and AlreadyCollided == false then
- Torso.Velocity = T[i].Velocity - Torso.Velocity * 0.5
- if Stuck <= 19 then
- local MOV = (Torso.Position - T[i].Position)
- local mov = Vector3.new(MOV.X,0,MOV.Z).unit
- if MOV.Y > 0 then
- mov = mov + Vector3.new(0,0.5,0)
- end
- FakeChar:TranslateBy(Vector3.new(mov.X,mov.Y,mov.Z))
- end
- AlreadyCollided = true
- end
- end
- end
- if Bump < 0 and LandTimer < 0 then
- local HeadTouch = Head:GetTouchingParts()
- for i = 1,#HeadTouch do
- if HeadTouch[i] and HeadTouch[i].CanCollide == true and HeadTouch[i].Parent ~= FakeChar and HeadCollided == false then
- if (HeadTouch[i].Velocity - Torso.Velocity).Magnitude > 16 then
- delay(0,function()
- Collide()
- end)
- end
- if (HeadTouch[i].Velocity - Torso.Velocity).Magnitude > 32 then
- Bump = 16
- if HP > 0 then
- delay(0,function()
- OW()
- end)
- end
- HeadCollided = true
- end
- Torso.Velocity = Vector3.new(Torso.Velocity.X,-Torso.Velocity.Y,Torso.Velocity.Z)
- end
- end
- end
- local LT = LeftLeg:GetTouchingParts()
- for i = 1,#LT do
- if LT[i] and string.lower(LT[i].Name) == "heal" and HP < 5 and HP > 0 then
- HP = 5
- Bill3.StudsOffsetWorldSpace = Torso.Position
- Bill3.Size = UDim2.new(12,0,12,0)
- Image3.ImageColor3 = Torso.Color
- delay(0,function()
- RecoverSound()
- end)
- end
- if LT[i] and LT[i].Parent ~= FakeChar and ((LT[i].CanCollide or NameMatch(LT[i])) or (LT[i].Size.Magnitude < 10 and LT[i]:FindFirstChildWhichIsA("TouchTransmitter") and LT[i].Name ~= "T")) then
- if LT[i].CanCollide and (LT[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(LT[i].Name) == "blade" then
- ExtraHit = true
- end
- if NameMatch(LT[i]) then
- Hit = true
- end
- if (LT[i].Velocity - Torso.Velocity).Magnitude > 160 then
- Hit = true
- if LT[i].CanCollide and AlreadyCollided == false then
- Torso.Velocity = LT[i].Velocity - Torso.Velocity * 0.5 + Vector3.new(0,10,0)
- Bump = 35
- if HP > 0 then
- delay(0,function()
- OW()
- end)
- end
- AlreadyCollided = true
- end
- elseif LT[i].CanCollide and AlreadyCollided == false then
- Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y * 0.12,Torso.Velocity.Z) + LT[i].Velocity + Vector3.new(0,10,0)
- AlreadyCollided = true
- end
- if LT[i].CanCollide then
- LastStep = LT[i].BrickColor
- if LandTimer < 0 then
- delay(0,function()
- Collide()
- end)
- end
- LandTimer = 4
- end
- end
- end
- local RT = RightLeg:GetTouchingParts()
- for i = 1,#RT do
- if RT[i] and string.lower(RT[i].Name) == "heal" and HP < 5 and HP > 0 then
- HP = 5
- end
- if RT[i] and RT[i].Parent ~= FakeChar and ((RT[i].CanCollide or NameMatch(RT[i])) or (RT[i].Size.Magnitude < 10 and RT[i]:FindFirstChildWhichIsA("TouchTransmitter") and RT[i].Name ~= "T")) then
- if RT[i].CanCollide and (RT[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(RT[i].Name) == "blade" then
- ExtraHit = true
- end
- if NameMatch(RT[i]) then
- Hit = true
- end
- if (RT[i].Velocity - Torso.Velocity).Magnitude > 160 then
- Hit = true
- if RT[i].CanCollide and AlreadyCollided == false then
- Torso.Velocity = RT[i].Velocity - Torso.Velocity * 0.5 + Vector3.new(0,10,0)
- Bump = 35
- if HP > 0 then
- delay(0,function()
- OW()
- end)
- end
- AlreadyCollided = true
- end
- elseif RT[i].CanCollide and AlreadyCollided == false then
- Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y * 0.12,Torso.Velocity.Z) + RT[i].Velocity + Vector3.new(0,10,0)
- AlreadyCollided = true
- end
- if RT[i].CanCollide then
- LastStep = RT[i].BrickColor
- if LandTimer < 0 then
- delay(0,function()
- Collide()
- end)
- end
- LandTimer = 4
- end
- end
- end
- end
- jointontors()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement