Advertisement
FloweyTheFlower

Roblox Scripts #68 YoYo Controller (Edit)

Jan 20th, 2018
834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.89 KB | None | 0 0
  1.     --[[SCRIPT NAME]]--
  2. --[[
  3.    
  4.     Move List
  5.    
  6.     edit by BonnieKunG1s
  7. --]]
  8. warn'Edit By BonnieKunG1s'
  9. local hes = game.Players.LocalPlayer.Character.Humanoid
  10. hes.MaxHealth = math.huge
  11. local plr = game.Players.LocalPlayer
  12. local char = plr.Character
  13. local mouse = plr:GetMouse()
  14. local torso = char.Torso
  15. local rs = torso["Right Shoulder"]
  16. local ls = torso["Left Shoulder"]
  17. local rh = torso["Right Hip"]
  18. local lh = torso["Left Hip"]
  19. local rj = char.HumanoidRootPart.RootJoint
  20. local neck = torso.Neck
  21. local animpose = "Idle"
  22. local attacking = false
  23. local cananim = true
  24. local rage = false
  25. local shield = nil
  26. local sprint = false
  27. local canrage = true
  28. local legs = false
  29. local trail = false
  30. local powers = false
  31. local bc = char:WaitForChild("Body Colors")
  32. local multiplier = 1
  33. local lac = char["Body Colors"].LeftArmColor
  34. local rac = char["Body Colors"].RightArmColor
  35. local rlc = char["Body Colors"].RightArmColor
  36. local llc = char["Body Colors"].LeftLegColor
  37. local hc = char["Body Colors"].HeadColor
  38. local tc = char["Body Colors"].TorsoColor
  39. local humanoid = char:FindFirstChildOfClass("Humanoid")
  40. local huge = Vector3.new(math.huge,math.huge,math.huge)
  41. local mobs = Instance.new("Sound", char)
  42. mobs.SoundId = "rbxassetid://649630245"
  43. mobs.Looped = true
  44. mobs.Volume = 3
  45. mobs:Play()
  46. if char:FindFirstChild("Animate") then char.Animate:Destroy() end
  47. if char:FindFirstChildOfClass("Humanoid"):FindFirstChild("Animator") then char:FindFirstChildOfClass("Humanoid").Animator:Destroy() end
  48. function legsonly()
  49.     spawn(function()
  50.         for i = 0, 10 do
  51.             wait(0.001)
  52.             if attacking then break end
  53.         end
  54.         if not attacking then
  55.             legs = false
  56.         end
  57.     end)
  58. end
  59. function swait(t)
  60.     if t == nil or t == 0 then
  61.         game:service('RunService').Stepped:wait(0)
  62.         return true
  63.     else
  64.         for i = 0, t do
  65.             game:service('RunService').Stepped:wait(0)
  66.         end
  67.         return true
  68.     end
  69. end
  70. function hurt(hit, dmg)
  71.     if hit.Parent then
  72.         if hit.Parent:IsA("LocalScript") then hit.Parent:Destroy() end
  73.         local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  74.         if hum then
  75.             if hum.Parent.Name ~= plr.Name then
  76.                 if dmg == "Kill" or hum.Health > 100000 then
  77.                     hit.Parent:BreakJoints()
  78.                     return true
  79.                 else
  80.                     if math.random(0, 100) == 50 then
  81.                         hum.Health = hum.Health - dmg*multiplier*2.5
  82.                     else
  83.                         hum.Health = hum.Health -dmg*multiplier
  84.                     end
  85.                     return true
  86.                 end
  87.             end
  88.         end
  89.     end
  90. end
  91. function soundeffect(id, volume, speed, parent)
  92.     spawn(function()
  93.     local s = Instance.new("Sound")
  94.     s.SoundId = id
  95.     s.Volume = volume
  96.     s.PlaybackSpeed = speed
  97.     s.Parent = parent
  98.     s:Play()
  99.     repeat wait() until not s.Playing
  100.     s:Destroy()
  101.     end)
  102. end
  103. function gethum(obj)
  104.     if obj.Parent then
  105.         if obj.Parent:FindFirstChild("Humanoid") then
  106.             if obj.Parent.Name ~= plr.Name then
  107.                 return obj.Parent:FindFirstChildOfClass("Humanoid")
  108.             end
  109.         end
  110.     end
  111. end
  112. function smooth(obj)
  113.     local sides = {"Left", "Right", "Top", "Bottom", "Front", "Back"}
  114.     for i,v in pairs(sides) do
  115.         obj[v.."Surface"] = "SmoothNoOutlines"
  116.     end
  117. end
  118. function getparent()
  119.     local par = workspace:FindFirstChild("BasePlate")
  120.     if not par then par = workspace:FindFirstChild("Base") end
  121.     if not par then par = char.Head end
  122.     return par
  123. end
  124. function fade(obj, dest, grow)
  125.     spawn(function()
  126.         local oldcf = obj.CFrame
  127.         for i = 0, 10 do
  128.             if grow then
  129.                 obj.Size = obj.Size +Vector3.new(1,1,1)
  130.                 obj.CFrame = oldcf
  131.             end
  132.             obj.Transparency = obj.Transparency +0.1
  133.             swait()
  134.         end
  135.         if dest then
  136.         obj:Destroy()
  137.         end
  138.     end)
  139. end
  140. function replacejoint(name)
  141.     local j = torso:FindFirstChild(name)
  142.     if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  143.     if j then
  144.         if true then
  145.             local new = Instance.new("Weld")
  146.             new.Part0 = j.Part0
  147.             j.Part0 = nil
  148.             new.Name = j.Name.." Replacement"
  149.             new.Parent = j.Parent
  150.             new.Part1 = j.Part1
  151.             new.C0 = j.C0
  152.             new.C1 = j.C1
  153.             return new
  154.         end
  155.     end
  156. end
  157. function removejoint(name)
  158.     local j = torso:FindFirstChild(name.." Replacement")
  159.     if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  160.     if j then
  161.         local p0 = j.Part0
  162.         local c0 = j.C0
  163.         local c1 = j.C1
  164.         j:Destroy()
  165.         local new = p0:FindFirstChild(name)
  166.         local ac0 = new.C0
  167.         local ac1 = new.C1
  168.         new.Part0 = p0
  169.         new.C0 = c0
  170.         new.C1 = c1
  171.         spawn(function()
  172.             for i = 0, 1, 0.1 do
  173.                 new.C0 = new.C0:Lerp(ac0, 0.7)
  174.                 new.C1 = new.C1:lerp(ac1, 0.7)
  175.                 wait()
  176.             end
  177.         end)
  178.     end
  179. end
  180. function fixalljoints()
  181.     for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip",  "Neck", "RootJoint"}) do
  182.         removejoint(v)
  183.     end
  184. end
  185. function getnewjoints()
  186.     local rs = replacejoint("Right Shoulder")
  187.     local ls = replacejoint("Left Shoulder")
  188.     local rh = replacejoint("Right Hip")
  189.     local lh = replacejoint("Left Hip")
  190.     local neck = replacejoint("Neck")
  191.     local rj = replacejoint("RootJoint")
  192.     return rs,ls,rh,lh,neck,rj
  193. end
  194. function chargegui()
  195.     local gui = Instance.new("ScreenGui")
  196.     gui.Name = "Charge"
  197.     item1 = Instance.new('TextLabel')
  198.     item1.Active = false
  199.     item1.AnchorPoint = Vector2.new(0, 0)
  200.     item1.BackgroundColor3 = Color3.new(1, 1, 1)
  201.     item1.BackgroundTransparency = 1
  202.     item1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  203.     item1.BorderSizePixel = 1
  204.     item1.Name = [[TextLabel]]
  205.     item1.Position = UDim2.new(0,620,0,11)
  206.     item1.Rotation = 0
  207.     item1.Selectable = false
  208.     item1.Size = UDim2.new(0,204,0,25)
  209.     item1.SizeConstraint = Enum.SizeConstraint.RelativeXY
  210.     item1.Visible = true
  211.     item1.ZIndex = 1
  212.     item1.ClipsDescendants = false
  213.     item1.Draggable = false
  214.     item1.Font = Enum.Font.SourceSansLight
  215.     item1.FontSize = Enum.FontSize.Size24
  216.     item1.Text = [[Charge Level]]
  217.     item1.TextColor3 = Color3.new(0, 0, 0)
  218.     item1.TextScaled = false
  219.     item1.TextSize = 24
  220.     item1.TextStrokeColor3 = Color3.new(0, 0, 0)
  221.     item1.TextStrokeTransparency = 1
  222.     item1.TextTransparency = 0
  223.     item1.TextWrapped = false
  224.     item1.TextXAlignment = Enum.TextXAlignment.Center
  225.     item1.TextYAlignment = Enum.TextYAlignment.Center
  226.     item1.Parent = gui
  227.     item2 = Instance.new('Frame')
  228.     item2.Active = false
  229.     item2.AnchorPoint = Vector2.new(0, 0)
  230.     item2.BackgroundColor3 = Color3.new(0, 0.760784, 0.0470588)
  231.     item2.BackgroundTransparency = 0
  232.     item2.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  233.     item2.BorderSizePixel = 0
  234.     item2.Name = [[Bar]]
  235.     item2.Position = UDim2.new(0,566,0,49)
  236.     item2.Rotation = 0
  237.     item2.Selectable = false
  238.     item2.Size = UDim2.new(0,312,0,55)
  239.     item2.SizeConstraint = Enum.SizeConstraint.RelativeXY
  240.     item2.Visible = true
  241.     item2.ZIndex = 2
  242.     item2.ClipsDescendants = false
  243.     item2.Draggable = false
  244.     item2.Parent = gui
  245.     item3 = Instance.new('Frame')
  246.     item3.Active = false
  247.     item3.AnchorPoint = Vector2.new(0, 0)
  248.     item3.BackgroundColor3 = Color3.new(0, 0, 0)
  249.     item3.BackgroundTransparency = 0
  250.     item3.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  251.     item3.BorderSizePixel = 0
  252.     item3.Name = [[Frame]]
  253.     item3.Position = UDim2.new(0,561,0,45)
  254.     item3.Rotation = 0
  255.     item3.Selectable = false
  256.     item3.Size = UDim2.new(0,322,0,54)
  257.     item3.SizeConstraint = Enum.SizeConstraint.RelativeXY
  258.     item3.Visible = true
  259.     item3.ZIndex = 1
  260.     item3.ClipsDescendants = false
  261.     item3.Draggable = false
  262.     item3.Parent = gui
  263.     gui.Parent = plr.PlayerGui
  264.     return gui
  265. end
  266. local keyamount = 0
  267. mouse.KeyDown:connect(function(key)
  268.     if key == "w" or key == "a" or key == "s" or key == "d" then
  269.         keyamount = keyamount + 1
  270.         if animpose ~= "Falling" then
  271.             animpose = "Walking"
  272.             if keyamount > 3 then keyamount = 0 end
  273.         end
  274.     end
  275. end)
  276. mouse.KeyUp:connect(function(key)
  277.     if key == "w" or key == "a" or key == "s" or key == "d" then
  278.         keyamount = keyamount - 1
  279.         if keyamount < 0 then keyamount = 0 end
  280.         if keyamount == 0 then
  281.             animpose = "Idle"
  282.         end
  283.     end
  284. end)
  285. local model = Instance.new("Model")
  286. model.Name = "YOYO"
  287. item1 = Instance.new('Part')
  288. item1.BrickColor = BrickColor.new('Really black')
  289.  item1.Material = Enum.Material.Plastic
  290. item1.Reflectance = 0
  291. item1.Transparency = 0
  292. item1.Name = 'Part1'
  293. item1.Anchored = false
  294. item1.CanCollide = true
  295. item1.Locked = true
  296. item1.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item1)
  297. item1.Parent = model
  298. item2 = Instance.new('Part')
  299. item2.BrickColor = BrickColor.new('White')
  300.  item2.Material = Enum.Material.Neon
  301. item2.Reflectance = 0
  302. item2.Transparency = 0
  303. item2.Name = 'Handle'
  304. item2.Anchored = false
  305. item2.CanCollide = true
  306. item2.Locked = true
  307. item2.Size = Vector3.new(0.299999982, 0.700000048, 0.700000048) smooth(item2)
  308. item2.Parent = model
  309. item3 = Instance.new('Part')
  310. item3.BrickColor = BrickColor.new('Really black')
  311.  item3.Material = Enum.Material.Plastic
  312. item3.Reflectance = 0
  313. item3.Transparency = 0
  314. item3.Name = 'Part2'
  315. item3.Anchored = false
  316. item3.CanCollide = true
  317. item3.Locked = true
  318. item3.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item3)
  319. item3.Parent = model
  320. item4 = Instance.new('Weld')
  321. item4.Name = 'Weld'
  322. item4.Part0 = model.Part1
  323. item4.Part1 = model.Handle
  324. item4.C0 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  325. item4.C1 = CFrame.new(-55.5500031, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  326. item4.Parent = model.Part1
  327. item5 = Instance.new('Weld')
  328. item5.Name = 'Weld'
  329. item5.Part0 = model.Part2
  330. item5.Part1 = model.Part1
  331. item5.C0 = CFrame.new(-55.8500023, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  332. item5.C1 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  333. item5.Parent = model.Part2
  334. item6 = Instance.new('SpecialMesh')
  335. item6.Name = 'Mesh'
  336. item6.MeshType = Enum.MeshType.Cylinder
  337. item6.MeshId = ''
  338. item6.Scale = Vector3.new(1, 1, 1)
  339. item6.Parent = model.Part1
  340. item7 = Instance.new('SpecialMesh')
  341. item7.Name = 'Mesh'
  342. item7.MeshType = Enum.MeshType.Cylinder
  343. item7.MeshId = ''
  344. item7.Scale = Vector3.new(1, 1, 1)
  345. item7.Parent = model.Handle
  346. item8 = Instance.new('SpecialMesh')
  347. item8.Name = 'Mesh'
  348. item8.MeshType = Enum.MeshType.Cylinder
  349. item8.MeshId = ''
  350. item8.Scale = Vector3.new(1, 1, 1)
  351. item8.Parent = model.Part2
  352. model.Parent = char
  353. local handle = model.Handle
  354. local handlew = Instance.new("Weld")
  355. handlew.Part0 = handle
  356. handlew.Part1 = char["Right Arm"]
  357. handlew.C1 = CFrame.new(0,-1,0)
  358. handlew.Parent = handle
  359. for i,v in pairs(model:children()) do
  360.     v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  361. end
  362.  
  363. local gdown = false
  364. local tdown = false
  365. mouse.KeyDown:connect(function(key)
  366.     if key == "g" and not attacking and not gdown then
  367.         local rs = replacejoint("Right Shoulder")
  368.         local ls = replacejoint("Left Shoulder")
  369.         local rj = replacejoint("RootJoint")
  370.         gdown = true
  371.         attacking = true
  372.         local gui = chargegui()
  373.         local bar = gui.Bar
  374.         local power = 0
  375.         repeat swait()
  376.             power = power + 5
  377.             if power > 312 then power = 312 end
  378.             bar.Size = UDim2.new(0,(power/312)*312,0,55)
  379.             ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.156434491, -0.987688541, 0, 0.987688541, 0.156434491, 1, 0, 0), 0.2)
  380.             rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.00657593738, -0.199269861, 0.979922593, -0.590055168, 0.791935623, 0.157082453, -0.807337344, -0.577175498, -0.122787893), 0.2)
  381.             rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.987688661, -0.156434506, 0, 0, 0, 1, -0.156434506, 0.987688661, 0), 0.2)
  382.         until not gdown
  383.         gui:Destroy()
  384.         for i = 0, 2, 0.1 do
  385.             ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.0523359701, -0.998629749, 0, 0.998629749, 0.0523359701, 1, 0, 0), 0.2)
  386.             rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.128450975, 0.152486846, 0.979922593, 0.968406498, -0.193699107, 0.157082453, 0.213763118, 0.969141543, -0.122787893), 0.2)
  387.             rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.992546797, 0.1218694, 0, 0, 0, 1, 0.1218694, 0.992546797, 0), 0.2)
  388.             if i == 0.5 then
  389.                 handlew.Part0 = nil
  390.                 local bv = Instance.new("BodyVelocity")
  391.                 bv.MaxForce = huge
  392.                 bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*(power*0.5)
  393.                 bv.Parent = handle
  394.                 game.Debris:AddItem(bv, 0.1)
  395.                 local con
  396.                 local w
  397.                 con = handle.Touched:connect(function(hit)
  398.                     if hurt(hit, 10) then
  399.                         con:disconnect()
  400.                         w = Instance.new("Weld")
  401.                         w.Part0 = hit
  402.                         w.Part1 = handle
  403.                         w.C0 = hit.CFrame:inverse()
  404.                         w.C1 = handle.CFrame:inverse()
  405.                         w.Parent = hit
  406.                     end
  407.                 end)
  408.                 local num = 0
  409.                 repeat swait()
  410.                     trail = true
  411.                     num = num + 1
  412.                 until num >= 100  or w
  413.                 if not w then con:disconnect() end
  414.                 handlew.C0 = CFrame.new(0,0,0)
  415.                 handlew.C1 = CFrame.new(0,-1,0)
  416.                 local cf = handle.CFrame
  417.                 for i = 1, 20 do
  418.                     handle.Anchored = false
  419.                     handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  420.                     handle.Anchored = true
  421.                     swait()
  422.                 end
  423.                 if w then w:Destroy() end
  424.                 handle.Anchored = false
  425.                 trail = false
  426.                 handlew.Part0 = handle
  427.             end
  428.             swait()
  429.         end
  430.        
  431.         attacking = false
  432.         fixalljoints()
  433.     end
  434.     if key == "f" and not attacking then
  435.         attacking = true
  436.         humanoid.WalkSpeed = 0
  437.         local touch = false
  438.         local num = 0
  439.         local parts = {}
  440.         local last = char.Torso.CFrame *CFrame.new(0,-3,0)
  441.         local lastscale = 1.5
  442.         local x,z = 0,0
  443.         local udown = false
  444.         handlew.Part0 = nil
  445.         local con = mouse.KeyDown:connect(function(key)
  446.             if key == "w" then
  447.                 z = z + -2
  448.                 udown = true
  449.             end
  450.             if key == "a" then
  451.                 x = x + -0.3
  452.             end
  453.             if key == "d" then
  454.                 x = x + 0.3
  455.             end
  456.         end)
  457.         local con2 = mouse.KeyUp:connect(function(key)
  458.             if key == "w" then
  459.                 udown = false
  460.                 z = z - -2
  461.             end
  462.             if key == "a" then
  463.                 x = x - -0.3
  464.             end
  465.             if key == "d" then
  466.                 x = x - 0.3
  467.             end
  468.         end)
  469.         local dir = char.Torso.CFrame.lookVector
  470.         local o = workspace.CurrentCamera.CameraType
  471.         handle.Anchored = true
  472.         repeat swait()
  473.             local start = last *CFrame.new(0,0,-lastscale/2)
  474.             local thing = false
  475.             if z == 0 then
  476.                 z = -2
  477.                 thing = true
  478.             end
  479.             local finish = last *CFrame.new(x,0,z)
  480.             local mag = (start.p-finish.p).magnitude
  481.             num = num + 1
  482.             local p = Instance.new("Part")
  483.             p.Size = Vector3.new(1,0.2,mag)
  484.             p.Name = "cool looking line that is just for looks"
  485.             p.Anchored = true
  486.             p.BrickColor = BrickColor.new("White")
  487.             p.Material = "Neon"
  488.             smooth(p)
  489.             p.CFrame = CFrame.new(start.p, finish.p)
  490.             p.CFrame = p.CFrame *CFrame.new(0,0,-mag/2)
  491.             handle.Anchored = false
  492.             handle.CFrame = p.CFrame *CFrame.new(0.3,0,0)
  493.             handle.Anchored = true
  494.             last = p.CFrame
  495.             lastscale = mag
  496.             local m = Instance.new("SpecialMesh")
  497.             m.MeshType = "Brick"
  498.             m.Parent = p
  499.             p.Touched:connect(function(hit)
  500.                 if hurt(hit, 200) then
  501.                     touch = true
  502.                     local p1 = Instance.new("Part")
  503.                     soundeffect("rbxassetid://636458264", 2, 1, p1)
  504.                     p1.Anchored = true
  505.                     p1.CanCollide = false
  506.                     p1.BrickColor = BrickColor.new("White")
  507.                     p1.Material = "Neon"
  508.                     p1.Name = "omega ex-u-plosion"
  509.                     p1.CFrame = p.CFrame
  510.                     p1.Size = Vector3.new(0.2,0.2,0.2)
  511.                     p1.Transparency = 1
  512.                     local m = Instance.new("SpecialMesh")
  513.                     m.MeshType = "Sphere"
  514.                     m.Parent = p1
  515.                     p1.Parent = getparent()
  516.                     local sub = -0.1
  517.                     for i = 1, 30 do
  518.                         if i >= 15 then sub = 0.1 end
  519.                         p1.Transparency = p1.Transparency + sub
  520.                         local cf = p1.CFrame
  521.                         p1.Size = p1.Size:Lerp(Vector3.new(10,10,10),0.2)
  522.                         p1.CFrame = cf
  523.                         swait()
  524.                     end
  525.                     p1:Destroy()
  526.                 end
  527.             end)
  528.             table.insert(parts, p)
  529.             p.Parent = getparent()
  530.             workspace.CurrentCamera.CameraType = "Scriptable"
  531.             workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame:Lerp(p.CFrame *CFrame.new(0,2,2),0.5)
  532.             if thing then
  533.                 z = 0 thing = false
  534.             end
  535.         until touch or num == 500
  536.         handle.Anchored = false
  537.         local cf = handle.CFrame
  538.         for i = 1, 40 do
  539.             handle.Anchored = false
  540.             handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  541.             handle.Anchored = true
  542.             swait()
  543.         end
  544.         handle.Anchored = false
  545.         handlew.Part0 = handle
  546.         workspace.CurrentCamera.CameraType = o
  547.         for i = 0, 1, 0.1 do
  548.             for i,v in pairs(parts) do
  549.                 v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,1,1),0.3)
  550.             end
  551.             swait()
  552.         end
  553.         for i,v in pairs(parts) do
  554.             v:Destroy()
  555.         end
  556.         humanoid.WalkSpeed = 16
  557.         attacking = false
  558.     end
  559.     if key == "y" and not attacking then
  560.         attacking = true
  561.         local rs = replacejoint("Right Shoulder")
  562.         local ls = replacejoint("Left Shoulder")
  563.         local rj = replacejoint("RootJoint")
  564.         local num = 0
  565.         for i = 0, 2, 0.1 do
  566.             handlew.C1 = handlew.C1:Lerp(CFrame.new(0,-4,0), 0.2)
  567.             ls.C0 = ls.C0:Lerp(CFrame.new(-0.754648447, 0.476126075, -0.315012902, -0.0523041263, -0.613378763, -0.788055778, -0.998022199, 0.0596848764, 0.0197843909, 0.0348996557, 0.78753221, -0.615287662), 0.2)
  568.             rs.C0 = rs.C0:Lerp(CFrame.new(0.759603679, 0.487401366, -0.319454879, -0.0523360372, 0.600990534, 0.797541499, 0.99863106, 0.0314966701, 0.0417973027, -9.12696123e-008, 0.798637211, -0.601816177), 0.2)
  569.             rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  570.             swait()
  571.         end
  572.         trail = true
  573.         local connection = handle.Touched:connect(function(hit)
  574.             hurt(hit, math.random(20,50))
  575.         end)
  576.         for i = 0, 150 do
  577.             if i%20 == 0 then soundeffect("rbxassetid://541909867", 2, 2, handle) end
  578.             rj.C0 = rj.C0:Lerp(rj.C0*CFrame.Angles(0,0,math.rad(4*(i/2))), 0.2)
  579.             swait()
  580.         end
  581.         trail = false
  582.         attacking = false
  583.         connection:disconnect()
  584.         fixalljoints()
  585.         handlew.C1 = CFrame.new(0,-1,0)
  586.     end
  587.     if key == "t" and not attacking and not tdown then
  588.         tdown = true
  589.         attacking = true
  590.         local rs = replacejoint("Right Shoulder")
  591.         handlew.C0 = CFrame.new(3,0,0)
  592.         local power = 0
  593.         trail = true
  594.         local cons = {}
  595.         for i,v in pairs(handle.Parent:children()) do
  596.             local con = v.Touched:connect(function(hit)
  597.                 hurt(hit, 10)
  598.             end)
  599.             table.insert(cons, con)
  600.         end
  601.         repeat swait()
  602.             power = power + 5
  603.             if power >= 180 then power = 180 end
  604.             rs.C0 = rs.C0:Lerp(CFrame.new(1.52548289, 0.0268524922, 0, 0, -0.998630881, -0.0523358211, 0, -0.0523358211, 0.998630881, -1, 0, 0), 0.2)
  605.             handlew.C1 = handlew.C1 *CFrame.Angles(0,math.rad((power/180)*20),0)
  606.         until not tdown
  607.         handlew.Part0 = nil
  608.         local bv = Instance.new("BodyVelocity")
  609.         bv.MaxForce = huge
  610.         bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*power
  611.         bv.Parent = handle
  612.         game.Debris:AddItem(bv, 0.1)
  613.         fixalljoints()
  614.         swait(100)
  615.         for i,v in pairs(cons) do
  616.             v:disconnect()
  617.         end
  618.         local cf = handle.CFrame
  619.         for i = 1, 20 do
  620.             handle.Anchored = false
  621.             handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  622.             handle.Anchored = true
  623.             swait()
  624.         end
  625.         handle.Anchored = false
  626.         handlew.C1 = CFrame.new(0,-1,0)
  627.         handlew.C0 = CFrame.new(0,0,0)
  628.         trail = false
  629.         handlew.Part0 = handle
  630.         attacking = false
  631.     end
  632. end)
  633. mouse.KeyUp:connect(function(key)
  634.     if key == "g" and attacking then
  635.         gdown = false
  636.     end
  637.     if key == "t" and attacking then
  638.         tdown = false
  639.     end
  640. end)
  641. local parts = {}
  642. spawn(function()
  643.     local num = 0
  644.     local lastpart = nil
  645.     local lastscale = 0.5
  646.     local cf = handle.CFrame
  647.     while swait() do
  648.         for i,v in pairs(parts) do
  649.             if v:FindFirstChild("Mesh") then
  650.                 v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,0,1), 0.2)
  651.                 if v.Mesh.Scale.X < 0.05 then
  652.                     v:Destroy()
  653.                 end
  654.             end
  655.         end
  656.         if trail and handle.CFrame ~= cf then
  657.             if not lastpart then lastpart = handle end
  658.             local start = lastpart.CFrame *CFrame.new(0,0,-lastscale/2)
  659.             local endpos = handle.CFrame
  660.             local mag = (start.p-endpos.p).magnitude
  661.             local p = Instance.new("Part")
  662.             p.Anchored = true
  663.             p.BrickColor = BrickColor.new("White")
  664.             p.Material = "Neon"
  665.             p.CanCollide = false
  666.             p.Size = Vector3.new(0.5,0.5,mag)
  667.             p.CFrame = CFrame.new(start.p, endpos.p)*CFrame.new(0,0,-mag/2)
  668.             local m = Instance.new("SpecialMesh")
  669.             m.MeshType = "Brick"
  670.             m.Parent = p
  671.             p.Parent = getparent()
  672.             table.insert(parts, p)
  673.             cf = handle.CFrame
  674.             lastscale = mag
  675.             lastpart = p
  676.         else
  677.             if lastpart then
  678.                 lastpart:Destroy()
  679.                 lastpart = nil
  680.                 lastscale = 0.5
  681.             end
  682.         end
  683.         local v = char.HumanoidRootPart.Velocity
  684.         if v.Y > 15 then
  685.             animpose = "Jump"
  686.         end
  687.         if v.Y < -15 then
  688.             animpose = "Falling"
  689.         end
  690.         if math.abs(v.X)+math.abs(v.Z) >=10 and v.Y == 0 then
  691.             animpose = "Walking"
  692.         end
  693.         if math.abs(v.X)+v.Y+math.abs(v.Z) <= 9 and v.Y == 0 then
  694.             animpose = "Idle"
  695.         end
  696.     end
  697. end)
  698. local num = 0
  699. while swait() do
  700.     num = num + 0.05
  701.     local sin = math.sin(num)
  702.     if animpose == "Walking" and cananim then
  703.         for i = 0, 1.5, 0.1 do
  704.             if animpose == "Walking" and cananim then
  705.                 ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0.0406726934, 0.0329360999, -0.99862957, 0.776081443, 0.62845856, 0.0523359552, 0.629320979, -0.777146459, 0), 0.2)
  706.                 rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.0388932228, -0.0350196026, 0.998629689, 0.742127001, 0.668214321, 0.0523359627, -0.66913116, 0.743145287, 0), 0.2)
  707.                 lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0.024677692, 0.0246776957, -0.999390841, 0.706676483, 0.706676781, 0.0348994955, 0.707107425, -0.707107246, 0), 0.2)
  708.                 rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -0.0136363264, -0.032125175, 0.999390841, 0.390493214, 0.919944584, 0.0348994955, -0.920505524, 0.390731305, 0), 0.2)
  709.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  710.                 rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.99969542, -0.0174524058, 0.0174497478, 0.0174524058, 0, 0.99984771, -0.0174497478, 0.99984771, 0.000304586458), 0.2)
  711.                 swait()
  712.             else
  713.                 break
  714.             end
  715.         end
  716.         for i = 0, 1.5, 0.1 do
  717.             if animpose == "Walking" and cananim then
  718.                 ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -0.0433885492, 0.0292659476, -0.99862957, -0.827903032, 0.558427453, 0.0523359552, 0.559194028, 0.829038858, 0), 0.2)
  719.                 rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0.0400917344, -0.0336409658, 0.998629689, -0.764996171, 0.641907811, 0.0523359627, -0.642788768, -0.76604563, 0), 0.2)
  720.                 lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -0.0163843632, 0.0308145005, -0.999390841, -0.469186544, 0.882411182, 0.0348994955, 0.882949054, 0.469472289, 0), 0.2)
  721.                 rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0.0246777162, -0.0246777181, 0.999390841, -0.70667702, 0.70667696, 0.0348994955, -0.707107902, -0.707107782, 0), 0.2)
  722.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  723.                 rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.999695539, 0.0174497515, -0.0174524095, -0.0174497515, 0.000304586574, 0.999847829, 0.0174524058, 0.99984771, -2.90993982e-11), 0.2)
  724.                 swait()
  725.             else
  726.                 break
  727.             end
  728.         end
  729.     end
  730.     if animpose == "Idle" and cananim then
  731.         ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.0523359552, -0.99862957, 0, 0.99862957, 0.0523359552, 1, 0, 0)*CFrame.new(0,sin/30,0)*CFrame.Angles(math.rad(sin*3),0,0), 0.2)
  732.         rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0, -0.0523359552, 0.99862957, 0, 0.99862957, 0.0523359552, -1, -0, 0)*CFrame.new(0,sin/30,0)*CFrame.Angles(math.rad(sin*3),0,0), 0.2)
  733.         lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0, 0.0348994955, -0.999390841, 0, 0.999390841, 0.0348994955, 1, 0, 0), 0.2)
  734.         rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0348994955, 0.999390841, 0, 0.999390841, 0.0348994955, -1, 0, 0), 0.2)
  735.         neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.994522035, -0.104528472, 0, 0, 0, 1, -0.104528472, 0.994522035, 0), 0.2)
  736.         rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.997564137, 0.0697564781, 0, 0, 0, 1, 0.0697564781, 0.997564137, 0), 0.2)
  737.         swait()
  738.     end
  739.     if animpose == "Jump" and cananim then
  740.         for i = 0, 0.8, 0.1 do
  741.             if animpose == "Jump" and cananim then
  742.                 ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.121869355, -0.99254632, 0, 0.99254632, 0.121869355, 1, 0, 0), 0.2)
  743.                 rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0, -0.104528472, 0.994522035, 0, 0.994522035, 0.104528472, -1, -0, 0), 0.2)
  744.                 lh.C0 = lh.C0:Lerp(CFrame.new(-1, -0.499999911, -0.5, 0, 0, -1, 0.309017062, 0.951056957, 0, 0.951056957, -0.309017062, 0), 0.2)
  745.                 rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, 0, 1, -0.121869355, 0.99254632, 0, -0.99254632, -0.121869355, 0), 0.2)
  746.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  747.                 rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  748.                 swait()
  749.             else
  750.                 break
  751.             end
  752.         end
  753.     end
  754.     if animpose == "Falling" and cananim then
  755.         ls.C0 = ls.C0:Lerp(CFrame.new(-0.987813056, 0.599254608, 0, 0, 0.121869355, -0.99254632, 0, 0.99254632, 0.121869355, 1, 0, 0), 0.2)
  756.         rs.C0 = rs.C0:Lerp(CFrame.new(0.986082673, 0.599026859, 0, 0, -0.139173135, 0.990268409, 0, 0.990268409, 0.139173135, -1, 0, 0), 0.2)
  757.         lh.C0 = lh.C0:Lerp(CFrame.new(-1, -0.963904023, 0.0336604826, 0, 0.104528472, -0.994522035, 0.0697564557, 0.992099881, 0.1042739, 0.997564554, -0.0693743229, -0.00729153492), 0.2)
  758.         rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0697564781, 0.997564137, -0.121869355, 0.990128577, 0.0692365244, -0.99254632, -0.121572495, -0.00850117672), 0.2)
  759.         neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0.13917312, 0.99026823, 0, 0.99026823, -0.13917312), 0.2)
  760.         rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  761.     end
  762. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement