Advertisement
KrYn0MoRe

dodge v1.1

Dec 15th, 2020
1,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.64 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
  4. local hum = char:FindFirstChildOfClass("Humanoid")
  5.  
  6. pcall(function()
  7.     char:FindFirstChild("Health"):Destroy()
  8. end)
  9.  
  10. local maxhealth = 10^9
  11. local curhealth = maxhealth
  12. local dir = 1
  13. local dist = 8
  14. local died = false
  15.  
  16. curhealth = hum.Health
  17.  
  18. local effects = Instance.new("Folder")
  19. effects.Parent = script
  20.  
  21. local tween = game:GetService("TweenService")
  22.  
  23. local theme = Instance.new("Sound")
  24. theme.SoundId = "rbxassetid://3956754701"
  25. theme.Looped = true
  26. theme.Volume = 1
  27. theme.Parent = torso
  28. theme:Play()
  29.  
  30. local sfx = Instance.new("Sound")
  31. sfx.Volume = 1
  32. sfx.SoundId = "rbxassetid://446961725"
  33. sfx.Parent = torso
  34.  
  35. function get_vec(part)
  36.     local v = {}
  37.     v.Up = part.CFrame.UpVector
  38.     v.Down = v.Up * -1
  39.     v.Right= part.CFrame.RightVector
  40.     v.Left = v.Right * -1
  41.     v.Front=part.CFrame.LookVector
  42.     v.Back = v.Front * -1
  43.     return v
  44. end
  45.  
  46. function cmiss(p)
  47.     local Part0 = Instance.new("Part")
  48.     local BillboardGui1 = Instance.new("BillboardGui")
  49.     local ImageLabel2 = Instance.new("ImageLabel")
  50.     local TextLabel3 = Instance.new("TextLabel")
  51.     Part0.Parent = script
  52.     Part0.Position = p
  53.     Part0.Transparency = 1
  54.     Part0.Size = Vector3.new()
  55.     Part0.Anchored = true
  56.     Part0.BottomSurface = Enum.SurfaceType.Smooth
  57.     Part0.CanCollide = false
  58.     Part0.Locked = true
  59.     Part0.TopSurface = Enum.SurfaceType.Smooth
  60.     BillboardGui1.Parent = Part0
  61.     BillboardGui1.Size = UDim2.new(5, 0, 2, 0)
  62.     BillboardGui1.Active = true
  63.     BillboardGui1.ClipsDescendants = true
  64.     BillboardGui1.ResetOnSpawn = false
  65.     BillboardGui1.Adornee = Part0
  66.     BillboardGui1.AlwaysOnTop = true
  67.     ImageLabel2.Name = "Frame"
  68.     ImageLabel2.Parent = BillboardGui1
  69.     ImageLabel2.Size = UDim2.new(1, 0, 1, 0)
  70.     ImageLabel2.BackgroundColor = BrickColor.new("Institutional white")
  71.     ImageLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  72.     ImageLabel2.BackgroundTransparency = 1
  73.     ImageLabel2.Image = "rbxassetid://3570695787"
  74.     ImageLabel2.ImageColor3 = Color3.new(1, 0.172549, 0.545098)
  75.     ImageLabel2.ScaleType = Enum.ScaleType.Slice
  76.     ImageLabel2.SliceCenter = Rect.new(100, 100, 100, 100)
  77.     TextLabel3.Parent = ImageLabel2
  78.     TextLabel3.Size = UDim2.new(1, 0, 1, 0)
  79.     TextLabel3.BackgroundColor = BrickColor.new("Institutional white")
  80.     TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
  81.     TextLabel3.BackgroundTransparency = 1
  82.     TextLabel3.Font = Enum.Font.Cartoon
  83.     TextLabel3.FontSize = Enum.FontSize.Size14
  84.     TextLabel3.Text = "LOL MISS"
  85.     TextLabel3.TextColor = BrickColor.new("Really black")
  86.     TextLabel3.TextColor3 = Color3.new(0, 0, 0)
  87.     TextLabel3.TextScaled = true
  88.     TextLabel3.TextSize = 14
  89.     TextLabel3.TextWrap = true
  90.     TextLabel3.TextWrapped = true
  91.     tween:Create(ImageLabel2,TweenInfo.new(3),{ImageTransparency = 1}):Play()
  92.     tween:Create(TextLabel3,TweenInfo.new(3),{TextTransparency = 1}):Play()
  93.     game:GetService("Debris"):AddItem(BillboardGui1,1.1)
  94. end
  95.  
  96. function ghost()
  97.     pcall(function()
  98.         cmiss(torso.Position)
  99.         for i,v in pairs(char:GetDescendants()) do
  100.             if v:IsA("BasePart") or v:IsA("UnionOperation") then
  101.                 local c = v:Clone()
  102.                 c.Transparency = 0.5
  103.                 c.Material = Enum.Material.SmoothPlastic
  104.                 c.Color = Color3.new(1,1,1)
  105.                 c.Anchored = true
  106.                 c.CanCollide = false
  107.                 c.Locked = true
  108.                 c.Massless = true
  109.                 for i,_v in pairs(c:GetChildren()) do
  110.                     if not _v:IsA("SpecialMesh") and not _v:IsA("BlockMesh") and not _v:IsA("CharacterMesh") then
  111.                         _v:Destroy()
  112.                     end
  113.                 end
  114.                 c.Parent = effects
  115.                 tween:Create(c,TweenInfo.new(3),{Transparency = 1}):Play()
  116.                 game:GetService("Debris"):AddItem(c,1.1)
  117.             end
  118.         end
  119.     end)
  120. end
  121.  
  122. function dodge(hit)
  123.     local orgnpos = torso.CFrame
  124.     local oldpos = (orgnpos*CFrame.new(0.1,0,0)).p
  125.     local newpos = orgnpos.p
  126.     local ext = Vector3.new()
  127.     if dir == 1 then
  128.         ext = Vector3.new(dist,0,dist)
  129.     elseif dir == 2 then
  130.         ext = Vector3.new(-dist,0,0)
  131.     elseif dir == 3 then
  132.         ext = Vector3.new(0,0,-dist)
  133.     elseif dir == 4 then
  134.         ext = Vector3.new(-dist,0,-dist)
  135.     elseif dir == 5 then
  136.         ext = Vector3.new(dist,0,-dist)
  137.     end
  138.     local vel = torso.Velocity
  139.     torso.CFrame = CFrame.new(oldpos,newpos)*CFrame.new(ext)
  140.     ghost()
  141.     dir = dir + 1
  142.     if dir > 5 then
  143.         dir = 1
  144.     end
  145.     sfx:Play()
  146.     wait()
  147.     torso.CFrame = orgnpos
  148.     torso.Velocity = vel
  149. end
  150.  
  151. hum.BreakJointsOnDeath = false
  152.  
  153. hum.HealthChanged:Connect(function(newhealth)
  154.     hum.BreakJointsOnDeath = false
  155.     if not died then else return end
  156.     if newhealth > curhealth and (newhealth-curhealth) >= 6 then
  157.         spawn(function()
  158.             dodge()
  159.         end)
  160.     end
  161.     hum.Health = hum.MaxHealth
  162.     curhealth = newhealth
  163. end)
  164.  
  165. hum.Died:Connect(function()
  166.     died = true
  167. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement