Advertisement
KrYn0MoRe

dodge v1.2

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