Znimator

Untitled

Jan 9th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7.     print("FE Compatibility by ki2005rill")
  8.     script.Parent = Player.Character
  9.  
  10.     --RemoteEvent for communicating
  11.     local Event = Instance.new("RemoteEvent")
  12.     Event.Name = "UserInput_Event"
  13.  
  14.     --Fake event to make stuff like Mouse.KeyDown work
  15.     local function fakeEvent()
  16.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17.         t.connect = t.Connect
  18.         return t
  19.     end
  20.  
  21.     --Creating fake input objects with fake variables
  22.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26.     end}
  27.     --Merged 2 functions into one by checking amount of arguments
  28.     CAS.UnbindAction = CAS.BindAction
  29.  
  30.     --This function will trigger the events that have been :Connect()'ed
  31.     local function te(self,ev,...)
  32.         local t = m[ev]
  33.         if t and t._fakeEvent and t.Function then
  34.             t.Function(...)
  35.         end
  36.     end
  37.     m.TrigEvent = te
  38.     UIS.TrigEvent = te
  39.  
  40.     Event.OnServerEvent:Connect(function(plr,io)
  41.         if plr~=Player then return end
  42.         if io.isMouse then
  43.             m.Target = io.Target
  44.             m.Hit = io.Hit
  45.         else
  46.             local b = io.UserInputState == Enum.UserInputState.Begin
  47.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.             end
  50.             for _,t in pairs(CAS.Actions) do
  51.                 for _,k in pairs(t.Keys) do
  52.                     if k==io.KeyCode then
  53.                         t.Function(t.Name,io.UserInputState,io)
  54.                     end
  55.                 end
  56.             end
  57.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.         end
  60.     end)
  61.     Event.Parent = NLS([==[
  62.     local Player = game:GetService("Players").LocalPlayer
  63.     local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.     local UIS = game:GetService("UserInputService")
  66.     local input = function(io,a)
  67.         if a then return end
  68.         --Since InputObject is a client-side instance, we create and pass table instead
  69.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70.     end
  71.     UIS.InputBegan:Connect(input)
  72.     UIS.InputEnded:Connect(input)
  73.  
  74.     local Mouse = Player:GetMouse()
  75.     local h,t
  76.     --Give the server mouse data 30 times every second, but only if the values changed
  77.     --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --[[SCRIPT NAME]]--
  87. --[[
  88.    
  89.     Move List
  90.    
  91.    
  92. --]]
  93. local plr = owner
  94. local char = plr.Character
  95. local torso = char.Torso
  96. local rs = torso["Right Shoulder"]
  97. local ls = torso["Left Shoulder"]
  98. local rh = torso["Right Hip"]
  99. local lh = torso["Left Hip"]
  100. local rj = char.HumanoidRootPart.RootJoint
  101. local neck = torso.Neck
  102. local animpose = "Idle"
  103. local attacking = false
  104. local cananim = true
  105. local rage = false
  106. local shield = nil
  107. local sprint = false
  108. local canrage = true
  109. local legs = false
  110. local trail = false
  111. local powers = false
  112. local bc = char:WaitForChild("Body Colors")
  113. local multiplier = 1
  114. local lac = char["Body Colors"].LeftArmColor
  115. local rac = char["Body Colors"].RightArmColor
  116. local rlc = char["Body Colors"].RightArmColor
  117. local llc = char["Body Colors"].LeftLegColor
  118. local hc = char["Body Colors"].HeadColor
  119. local tc = char["Body Colors"].TorsoColor
  120. local humanoid = char:FindFirstChildOfClass("Humanoid")
  121. local huge = Vector3.new(math.huge,math.huge,math.huge)
  122. local mobs = Instance.new("Sound", char)
  123. mobs.SoundId = "rbxassetid://soundid"
  124. mobs.Looped = true
  125. mobs.Volume = 3
  126. mobs:Play()
  127. if char:FindFirstChild("Animate") then char.Animate:Destroy() end
  128. if char:FindFirstChildOfClass("Humanoid"):FindFirstChild("Animator") then char:FindFirstChildOfClass("Humanoid").Animator:Destroy() end
  129. function legsonly()
  130.     spawn(function()
  131.         for i = 0, 10 do
  132.             wait(0.001)
  133.             if attacking then break end
  134.         end
  135.         if not attacking then
  136.             legs = false
  137.         end
  138.     end)
  139. end
  140. function swait(t)
  141.     if t == nil or t == 0 then
  142.         game:service('RunService').Stepped:wait(0)
  143.         return true
  144.     else
  145.         for i = 0, t do
  146.             game:service('RunService').Stepped:wait(0)
  147.         end
  148.         return true
  149.     end
  150. end
  151. function hurt(hit, dmg)
  152.     if hit.Parent then
  153.         if hit.Parent:IsA("LocalScript") then hit.Parent:Destroy() end
  154.         local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  155.         if hum then
  156.             if hum.Parent.Name ~= plr.Name then
  157.                 if dmg == "Kill" or hum.Health > 100000 then
  158.                     hit.Parent:BreakJoints()
  159.                     return true
  160.                 else
  161.                     if math.random(0, 100) == 50 then
  162.                         hum.Health = hum.Health - dmg*multiplier*2.5
  163.                     else
  164.                         hum.Health = hum.Health -dmg*multiplier
  165.                     end
  166.                     return true
  167.                 end
  168.             end
  169.         end
  170.     end
  171. end
  172. function soundeffect(id, volume, speed, parent)
  173.     spawn(function()
  174.     local s = Instance.new("Sound")
  175.     s.SoundId = id
  176.     s.Volume = volume
  177.     s.PlaybackSpeed = speed
  178.     s.Parent = parent
  179.     s:Play()
  180.     repeat wait() until not s.Playing
  181.     s:Destroy()
  182.     end)
  183. end
  184. function gethum(obj)
  185.     if obj.Parent then
  186.         if obj.Parent:FindFirstChild("Humanoid") then
  187.             if obj.Parent.Name ~= plr.Name then
  188.                 return obj.Parent:FindFirstChildOfClass("Humanoid")
  189.             end
  190.         end
  191.     end
  192. end
  193. function smooth(obj)
  194.     local sides = {"Left", "Right", "Top", "Bottom", "Front", "Back"}
  195.     for i,v in pairs(sides) do
  196.         obj[v.."Surface"] = "SmoothNoOutlines"
  197.     end
  198. end
  199. function getparent()
  200.     local par = workspace:FindFirstChild("BasePlate")
  201.     if not par then par = workspace:FindFirstChild("Base") end
  202.     if not par then par = char.Head end
  203.     return par
  204. end
  205. function fade(obj, dest, grow)
  206.     spawn(function()
  207.         local oldcf = obj.CFrame
  208.         for i = 0, 10 do
  209.             if grow then
  210.                 obj.Size = obj.Size +Vector3.new(1,1,1)
  211.                 obj.CFrame = oldcf
  212.             end
  213.             obj.Transparency = obj.Transparency +0.1
  214.             swait()
  215.         end
  216.         if dest then
  217.         obj:Destroy()
  218.         end
  219.     end)
  220. end
  221. function replacejoint(name)
  222.     local j = torso:FindFirstChild(name)
  223.     if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  224.     if j then
  225.         if true then
  226.             local new = Instance.new("Weld")
  227.             new.Part0 = j.Part0
  228.             j.Part0 = nil
  229.             new.Name = j.Name.." Replacement"
  230.             new.Parent = j.Parent
  231.             new.Part1 = j.Part1
  232.             new.C0 = j.C0
  233.             new.C1 = j.C1
  234.             return new
  235.         end
  236.     end
  237. end
  238. function removejoint(name)
  239.     local j = torso:FindFirstChild(name.." Replacement")
  240.     if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  241.     if j then
  242.         local p0 = j.Part0
  243.         local c0 = j.C0
  244.         local c1 = j.C1
  245.         j:Destroy()
  246.         local new = p0:FindFirstChild(name)
  247.         local ac0 = new.C0
  248.         local ac1 = new.C1
  249.         new.Part0 = p0
  250.         new.C0 = c0
  251.         new.C1 = c1
  252.         spawn(function()
  253.             for i = 0, 1, 0.1 do
  254.                 new.C0 = new.C0:Lerp(ac0, 0.7)
  255.                 new.C1 = new.C1:lerp(ac1, 0.7)
  256.                 wait()
  257.             end
  258.         end)
  259.     end
  260. end
  261. function fixalljoints()
  262.     for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip",  "Neck", "RootJoint"}) do
  263.         removejoint(v)
  264.     end
  265. end
  266. function getnewjoints()
  267.     local rs = replacejoint("Right Shoulder")
  268.     local ls = replacejoint("Left Shoulder")
  269.     local rh = replacejoint("Right Hip")
  270.     local lh = replacejoint("Left Hip")
  271.     local neck = replacejoint("Neck")
  272.     local rj = replacejoint("RootJoint")
  273.     return rs,ls,rh,lh,neck,rj
  274. end
  275. function chargegui()
  276.     local gui = Instance.new("ScreenGui")
  277.     gui.Name = "Charge"
  278.     item1 = Instance.new('TextLabel')
  279.     item1.Active = false
  280.     item1.AnchorPoint = Vector2.new(0, 0)
  281.     item1.BackgroundColor3 = Color3.new(1, 1, 1)
  282.     item1.BackgroundTransparency = 1
  283.     item1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  284.     item1.BorderSizePixel = 1
  285.     item1.Name = [[TextLabel]]
  286.     item1.Position = UDim2.new(0,620,0,11)
  287.     item1.Rotation = 0
  288.     item1.Selectable = false
  289.     item1.Size = UDim2.new(0,204,0,25)
  290.     item1.SizeConstraint = Enum.SizeConstraint.RelativeXY
  291.     item1.Visible = true
  292.     item1.ZIndex = 1
  293.     item1.ClipsDescendants = false
  294.     item1.Draggable = false
  295.     item1.Font = Enum.Font.SourceSansLight
  296.     item1.FontSize = Enum.FontSize.Size24
  297.     item1.Text = [[Charge Level]]
  298.     item1.TextColor3 = Color3.new(0, 0, 0)
  299.     item1.TextScaled = false
  300.     item1.TextSize = 24
  301.     item1.TextStrokeColor3 = Color3.new(0, 0, 0)
  302.     item1.TextStrokeTransparency = 1
  303.     item1.TextTransparency = 0
  304.     item1.TextWrapped = false
  305.     item1.TextXAlignment = Enum.TextXAlignment.Center
  306.     item1.TextYAlignment = Enum.TextYAlignment.Center
  307.     item1.Parent = gui
  308.     item2 = Instance.new('Frame')
  309.     item2.Active = false
  310.     item2.AnchorPoint = Vector2.new(0, 0)
  311.     item2.BackgroundColor3 = Color3.new(0, 0.760784, 0.0470588)
  312.     item2.BackgroundTransparency = 0
  313.     item2.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  314.     item2.BorderSizePixel = 0
  315.     item2.Name = [[Bar]]
  316.     item2.Position = UDim2.new(0,566,0,49)
  317.     item2.Rotation = 0
  318.     item2.Selectable = false
  319.     item2.Size = UDim2.new(0,312,0,55)
  320.     item2.SizeConstraint = Enum.SizeConstraint.RelativeXY
  321.     item2.Visible = true
  322.     item2.ZIndex = 2
  323.     item2.ClipsDescendants = false
  324.     item2.Draggable = false
  325.     item2.Parent = gui
  326.     item3 = Instance.new('Frame')
  327.     item3.Active = false
  328.     item3.AnchorPoint = Vector2.new(0, 0)
  329.     item3.BackgroundColor3 = Color3.new(0, 0, 0)
  330.     item3.BackgroundTransparency = 0
  331.     item3.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  332.     item3.BorderSizePixel = 0
  333.     item3.Name = [[Frame]]
  334.     item3.Position = UDim2.new(0,561,0,45)
  335.     item3.Rotation = 0
  336.     item3.Selectable = false
  337.     item3.Size = UDim2.new(0,322,0,54)
  338.     item3.SizeConstraint = Enum.SizeConstraint.RelativeXY
  339.     item3.Visible = true
  340.     item3.ZIndex = 1
  341.     item3.ClipsDescendants = false
  342.     item3.Draggable = false
  343.     item3.Parent = gui
  344.     gui.Parent = plr.PlayerGui
  345.     return gui
  346. end
  347. local keyamount = 0
  348. mouse.KeyDown:connect(function(key)
  349.     if key == "w" or key == "a" or key == "s" or key == "d" then
  350.         keyamount = keyamount + 1
  351.         if animpose ~= "Falling" then
  352.             animpose = "Walking"
  353.             if keyamount > 3 then keyamount = 0 end
  354.         end
  355.     end
  356. end)
  357. mouse.KeyUp:connect(function(key)
  358.     if key == "w" or key == "a" or key == "s" or key == "d" then
  359.         keyamount = keyamount - 1
  360.         if keyamount < 0 then keyamount = 0 end
  361.         if keyamount == 0 then
  362.             animpose = "Idle"
  363.         end
  364.     end
  365. end)
  366. local model = Instance.new("Model")
  367. model.Name = "YOYO"
  368. item1 = Instance.new('Part')
  369. item1.BrickColor = BrickColor.new('Really black')
  370.  item1.Material = Enum.Material.Plastic
  371. item1.Reflectance = 0
  372. item1.Transparency = 0
  373. item1.Name = 'Part1'
  374. item1.Anchored = false
  375. item1.CanCollide = true
  376. item1.Locked = true
  377. item1.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item1)
  378. item1.Parent = model
  379. item2 = Instance.new('Part')
  380. item2.BrickColor = BrickColor.new('Crimson')
  381.  item2.Material = Enum.Material.Neon
  382. item2.Reflectance = 0
  383. item2.Transparency = 0
  384. item2.Name = 'Handle'
  385. item2.Anchored = false
  386. item2.CanCollide = true
  387. item2.Locked = true
  388. item2.Size = Vector3.new(0.299999982, 0.700000048, 0.700000048) smooth(item2)
  389. item2.Parent = model
  390. item3 = Instance.new('Part')
  391. item3.BrickColor = BrickColor.new('Really black')
  392.  item3.Material = Enum.Material.Plastic
  393. item3.Reflectance = 0
  394. item3.Transparency = 0
  395. item3.Name = 'Part2'
  396. item3.Anchored = false
  397. item3.CanCollide = true
  398. item3.Locked = true
  399. item3.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item3)
  400. item3.Parent = model
  401. item4 = Instance.new('Weld')
  402. item4.Name = 'Weld'
  403. item4.Part0 = model.Part1
  404. item4.Part1 = model.Handle
  405. item4.C0 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  406. item4.C1 = CFrame.new(-55.5500031, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  407. item4.Parent = model.Part1
  408. item5 = Instance.new('Weld')
  409. item5.Name = 'Weld'
  410. item5.Part0 = model.Part2
  411. item5.Part1 = model.Part1
  412. item5.C0 = CFrame.new(-55.8500023, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  413. item5.C1 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  414. item5.Parent = model.Part2
  415. item6 = Instance.new('SpecialMesh')
  416. item6.Name = 'Mesh'
  417. item6.MeshType = Enum.MeshType.Cylinder
  418. item6.MeshId = ''
  419. item6.Scale = Vector3.new(1, 1, 1)
  420. item6.Parent = model.Part1
  421. item7 = Instance.new('SpecialMesh')
  422. item7.Name = 'Mesh'
  423. item7.MeshType = Enum.MeshType.Cylinder
  424. item7.MeshId = ''
  425. item7.Scale = Vector3.new(1, 1, 1)
  426. item7.Parent = model.Handle
  427. item8 = Instance.new('SpecialMesh')
  428. item8.Name = 'Mesh'
  429. item8.MeshType = Enum.MeshType.Cylinder
  430. item8.MeshId = ''
  431. item8.Scale = Vector3.new(1, 1, 1)
  432. item8.Parent = model.Part2
  433. model.Parent = char
  434. local handle = model.Handle
  435. local handlew = Instance.new("Weld")
  436. handlew.Part0 = handle
  437. handlew.Part1 = char["Right Arm"]
  438. handlew.C1 = CFrame.new(0,-1,0)
  439. handlew.Parent = handle
  440. for i,v in pairs(model:children()) do
  441.     v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  442. end
  443.  
  444. local gdown = false
  445. local tdown = false
  446. mouse.KeyDown:connect(function(key)
  447.     if key == "g" and not attacking and not gdown then
  448.         local rs = replacejoint("Right Shoulder")
  449.         local ls = replacejoint("Left Shoulder")
  450.         local rj = replacejoint("RootJoint")
  451.         gdown = true
  452.         attacking = true
  453.         local gui = chargegui()
  454.         local bar = gui.Bar
  455.         local power = 0
  456.         repeat swait()
  457.             power = power + 5
  458.             if power > 312 then power = 312 end
  459.             bar.Size = UDim2.new(0,(power/312)*312,0,55)
  460.             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)
  461.             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)
  462.             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)
  463.         until not gdown
  464.         gui:Destroy()
  465.         for i = 0, 2, 0.1 do
  466.             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)
  467.             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)
  468.             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)
  469.             if i == 0.5 then
  470.                 handlew.Part0 = nil
  471.                 local bv = Instance.new("BodyVelocity")
  472.                 bv.MaxForce = huge
  473.                 bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*(power*0.5)
  474.                 bv.Parent = handle
  475.                 game.Debris:AddItem(bv, 0.1)
  476.                 local con
  477.                 local w
  478.                 con = handle.Touched:connect(function(hit)
  479.                     if hurt(hit, 10) then
  480.                         con:disconnect()
  481.                         w = Instance.new("Weld")
  482.                         w.Part0 = hit
  483.                         w.Part1 = handle
  484.                         w.C0 = hit.CFrame:inverse()
  485.                         w.C1 = handle.CFrame:inverse()
  486.                         w.Parent = hit
  487.                     end
  488.                 end)
  489.                 local num = 0
  490.                 repeat swait()
  491.                     trail = true
  492.                     num = num + 1
  493.                 until num >= 100  or w
  494.                 if not w then con:disconnect() end
  495.                 handlew.C0 = CFrame.new(0,0,0)
  496.                 handlew.C1 = CFrame.new(0,-1,0)
  497.                 local cf = handle.CFrame
  498.                 for i = 1, 20 do
  499.                     handle.Anchored = false
  500.                     handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  501.                     handle.Anchored = true
  502.                     swait()
  503.                 end
  504.                 if w then w:Destroy() end
  505.                 handle.Anchored = false
  506.                 trail = false
  507.                 handlew.Part0 = handle
  508.             end
  509.             swait()
  510.         end
  511.        
  512.         attacking = false
  513.         fixalljoints()
  514.     end
  515.     if key == "f" and not attacking then
  516.         attacking = true
  517.         humanoid.WalkSpeed = 0
  518.         local touch = false
  519.         local num = 0
  520.         local parts = {}
  521.         local last = char.Torso.CFrame *CFrame.new(0,-3,0)
  522.         local lastscale = 1.5
  523.         local x,z = 0,0
  524.         local udown = false
  525.         handlew.Part0 = nil
  526.         local con = mouse.KeyDown:connect(function(key)
  527.             if key == "w" then
  528.                 z = z + -2
  529.                 udown = true
  530.             end
  531.             if key == "a" then
  532.                 x = x + -0.3
  533.             end
  534.             if key == "d" then
  535.                 x = x + 0.3
  536.             end
  537.         end)
  538.         local con2 = mouse.KeyUp:connect(function(key)
  539.             if key == "w" then
  540.                 udown = false
  541.                 z = z - -2
  542.             end
  543.             if key == "a" then
  544.                 x = x - -0.3
  545.             end
  546.             if key == "d" then
  547.                 x = x - 0.3
  548.             end
  549.         end)
  550.         local dir = char.Torso.CFrame.lookVector
  551.         local o = workspace.CurrentCamera.CameraType
  552.         handle.Anchored = true
  553.         repeat swait()
  554.             local start = last *CFrame.new(0,0,-lastscale/2)
  555.             local thing = false
  556.             if z == 0 then
  557.                 z = -2
  558.                 thing = true
  559.             end
  560.             local finish = last *CFrame.new(x,0,z)
  561.             local mag = (start.p-finish.p).magnitude
  562.             num = num + 1
  563.             local p = Instance.new("Part")
  564.             p.Size = Vector3.new(1,0.2,mag)
  565.             p.Name = "cool looking line that is just for looks"
  566.             p.Anchored = true
  567.             p.BrickColor = BrickColor.new("Crimson")
  568.             p.Material = "Neon"
  569.             smooth(p)
  570.             p.CFrame = CFrame.new(start.p, finish.p)
  571.             p.CFrame = p.CFrame *CFrame.new(0,0,-mag/2)
  572.             handle.Anchored = false
  573.             handle.CFrame = p.CFrame *CFrame.new(0.3,0,0)
  574.             handle.Anchored = true
  575.             last = p.CFrame
  576.             lastscale = mag
  577.             local m = Instance.new("SpecialMesh")
  578.             m.MeshType = "Brick"
  579.             m.Parent = p
  580.             p.Touched:connect(function(hit)
  581.                 if hurt(hit, 200) then
  582.                     touch = true
  583.                     local p1 = Instance.new("Part")
  584.                     soundeffect("rbxassetid://636458264", 2, 1, p1)
  585.                     p1.Anchored = true
  586.                     p1.CanCollide = false
  587.                     p1.BrickColor = BrickColor.new("Crimson")
  588.                     p1.Material = "Neon"
  589.                     p1.Name = "omega ex-u-plosion"
  590.                     p1.CFrame = p.CFrame
  591.                     p1.Size = Vector3.new(0.2,0.2,0.2)
  592.                     p1.Transparency = 1
  593.                     local m = Instance.new("SpecialMesh")
  594.                     m.MeshType = "Sphere"
  595.                     m.Parent = p1
  596.                     p1.Parent = getparent()
  597.                     local sub = -0.1
  598.                     for i = 1, 30 do
  599.                         if i >= 15 then sub = 0.1 end
  600.                         p1.Transparency = p1.Transparency + sub
  601.                         local cf = p1.CFrame
  602.                         p1.Size = p1.Size:Lerp(Vector3.new(10,10,10),0.2)
  603.                         p1.CFrame = cf
  604.                         swait()
  605.                     end
  606.                     p1:Destroy()
  607.                 end
  608.             end)
  609.             table.insert(parts, p)
  610.             p.Parent = getparent()
  611.             workspace.CurrentCamera.CameraType = "Scriptable"
  612.             workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame:Lerp(p.CFrame *CFrame.new(0,2,2),0.5)
  613.             if thing then
  614.                 z = 0 thing = false
  615.             end
  616.         until touch or num == 500
  617.         handle.Anchored = false
  618.         local cf = handle.CFrame
  619.         for i = 1, 40 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.Part0 = handle
  627.         workspace.CurrentCamera.CameraType = o
  628.         for i = 0, 1, 0.1 do
  629.             for i,v in pairs(parts) do
  630.                 v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,1,1),0.3)
  631.             end
  632.             swait()
  633.         end
  634.         for i,v in pairs(parts) do
  635.             v:Destroy()
  636.         end
  637.         humanoid.WalkSpeed = 16
  638.         attacking = false
  639.     end
  640.     if key == "y" and not attacking then
  641.         attacking = true
  642.         local rs = replacejoint("Right Shoulder")
  643.         local ls = replacejoint("Left Shoulder")
  644.         local rj = replacejoint("RootJoint")
  645.         local num = 0
  646.         for i = 0, 2, 0.1 do
  647.             handlew.C1 = handlew.C1:Lerp(CFrame.new(0,-4,0), 0.2)
  648.             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)
  649.             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)
  650.             rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  651.             swait()
  652.         end
  653.         trail = true
  654.         local connection = handle.Touched:connect(function(hit)
  655.             hurt(hit, math.random(20,50))
  656.         end)
  657.         for i = 0, 150 do
  658.             if i%20 == 0 then soundeffect("rbxassetid://541909867", 2, 2, handle) end
  659.             rj.C0 = rj.C0:Lerp(rj.C0*CFrame.Angles(0,0,math.rad(4*(i/2))), 0.2)
  660.             swait()
  661.         end
  662.         trail = false
  663.         attacking = false
  664.         connection:disconnect()
  665.         fixalljoints()
  666.         handlew.C1 = CFrame.new(0,-1,0)
  667.     end
  668.     if key == "t" and not attacking and not tdown then
  669.         tdown = true
  670.         attacking = true
  671.         local rs = replacejoint("Right Shoulder")
  672.         handlew.C0 = CFrame.new(3,0,0)
  673.         local power = 0
  674.         trail = true
  675.         local cons = {}
  676.         for i,v in pairs(handle.Parent:children()) do
  677.             local con = v.Touched:connect(function(hit)
  678.                 hurt(hit, 10)
  679.             end)
  680.             table.insert(cons, con)
  681.         end
  682.         repeat swait()
  683.             power = power + 5
  684.             if power >= 180 then power = 180 end
  685.             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)
  686.             handlew.C1 = handlew.C1 *CFrame.Angles(0,math.rad((power/180)*20),0)
  687.         until not tdown
  688.         handlew.Part0 = nil
  689.         local bv = Instance.new("BodyVelocity")
  690.         bv.MaxForce = huge
  691.         bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*power
  692.         bv.Parent = handle
  693.         game.Debris:AddItem(bv, 0.1)
  694.         fixalljoints()
  695.         swait(100)
  696.         for i,v in pairs(cons) do
  697.             v:disconnect()
  698.         end
  699.         local cf = handle.CFrame
  700.         for i = 1, 20 do
  701.             handle.Anchored = false
  702.             handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  703.             handle.Anchored = true
  704.             swait()
  705.         end
  706.         handle.Anchored = false
  707.         handlew.C1 = CFrame.new(0,-1,0)
  708.         handlew.C0 = CFrame.new(0,0,0)
  709.         trail = false
  710.         handlew.Part0 = handle
  711.         attacking = false
  712.     end
  713. end)
  714. mouse.KeyUp:connect(function(key)
  715.     if key == "g" and attacking then
  716.         gdown = false
  717.     end
  718.     if key == "t" and attacking then
  719.         tdown = false
  720.     end
  721. end)
  722. local parts = {}
  723. spawn(function()
  724.     local num = 0
  725.     local lastpart = nil
  726.     local lastscale = 0.5
  727.     local cf = handle.CFrame
  728.     while swait() do
  729.         for i,v in pairs(parts) do
  730.             if v:FindFirstChild("Mesh") then
  731.                 v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,0,1), 0.2)
  732.                 if v.Mesh.Scale.X < 0.05 then
  733.                     v:Destroy()
  734.                 end
  735.             end
  736.         end
  737.         if trail and handle.CFrame ~= cf then
  738.             if not lastpart then lastpart = handle end
  739.             local start = lastpart.CFrame *CFrame.new(0,0,-lastscale/2)
  740.             local endpos = handle.CFrame
  741.             local mag = (start.p-endpos.p).magnitude
  742.             local p = Instance.new("Part")
  743.             p.Anchored = true
  744.             p.BrickColor = BrickColor.new("Crimson")
  745.             p.Material = "Neon"
  746.             p.CanCollide = false
  747.             p.Size = Vector3.new(0.5,0.5,mag)
  748.             p.CFrame = CFrame.new(start.p, endpos.p)*CFrame.new(0,0,-mag/2)
  749.             local m = Instance.new("SpecialMesh")
  750.             m.MeshType = "Brick"
  751.             m.Parent = p
  752.             p.Parent = getparent()
  753.             table.insert(parts, p)
  754.             cf = handle.CFrame
  755.             lastscale = mag
  756.             lastpart = p
  757.         else
  758.             if lastpart then
  759.                 lastpart:Destroy()
  760.                 lastpart = nil
  761.                 lastscale = 0.5
  762.             end
  763.         end
  764.         local v = char.HumanoidRootPart.Velocity
  765.         if v.Y > 15 then
  766.             animpose = "Jump"
  767.         end
  768.         if v.Y < -15 then
  769.             animpose = "Falling"
  770.         end
  771.         if math.abs(v.X)+math.abs(v.Z) >=10 and v.Y == 0 then
  772.             animpose = "Walking"
  773.         end
  774.         if math.abs(v.X)+v.Y+math.abs(v.Z) <= 9 and v.Y == 0 then
  775.             animpose = "Idle"
  776.         end
  777.     end
  778. end)
  779. local num = 0
  780. while swait() do
  781.     num = num + 0.05
  782.     local sin = math.sin(num)
  783.     if animpose == "Walking" and cananim then
  784.         for i = 0, 1.5, 0.1 do
  785.             if animpose == "Walking" and cananim then
  786.                 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)
  787.                 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)
  788.                 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)
  789.                 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)
  790.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  791.                 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)
  792.                 swait()
  793.             else
  794.                 break
  795.             end
  796.         end
  797.         for i = 0, 1.5, 0.1 do
  798.             if animpose == "Walking" and cananim then
  799.                 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)
  800.                 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)
  801.                 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)
  802.                 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)
  803.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  804.                 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)
  805.                 swait()
  806.             else
  807.                 break
  808.             end
  809.         end
  810.     end
  811.     if animpose == "Idle" and cananim then
  812.         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)
  813.         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)
  814.         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)
  815.         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)
  816.         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)
  817.         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)
  818.         swait()
  819.     end
  820.     if animpose == "Jump" and cananim then
  821.         for i = 0, 0.8, 0.1 do
  822.             if animpose == "Jump" and cananim then
  823.                 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)
  824.                 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)
  825.                 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)
  826.                 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)
  827.                 neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  828.                 rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  829.                 swait()
  830.             else
  831.                 break
  832.             end
  833.         end
  834.     end
  835.     if animpose == "Falling" and cananim then
  836.         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)
  837.         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)
  838.         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)
  839.         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)
  840.         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)
  841.         rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  842.     end
  843. end
Advertisement
Add Comment
Please, Sign In to add comment