Advertisement
idkwhatiam

Ryu -- A roblox script. (WIP)

May 4th, 2019
1,417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 28.80 KB | None | 0 0
  1. -------
  2. --Ryu--
  3. -------
  4.  
  5. --Fe Converter--
  6. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  7. do
  8.     script.Parent = owner.Character
  9.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  10.     local function NewFakeEvent()
  11.         local Bind = Instance.new("BindableEvent")
  12.         local Fake;Fake = {Connections = {},
  13.         fakeEvent=true;
  14.         Connect=function(self,Func)
  15.             Bind.Event:connect(Func)
  16.             self.Connections[Bind] = true
  17.             return setmetatable({Connected = true},{
  18.             __index = function (self,Index)
  19.                 if Index:lower() == "disconnect" then
  20.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  21.                 end
  22.                 return Fake[Index]
  23.             end;
  24.             __tostring = function() return "Connection" end;
  25.         })
  26.         end}
  27.         Fake.connect = Fake.Connect;return Fake;
  28.     end
  29.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  30.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  31.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  32.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  33.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  34.     local function TriggerEvent(self,Event,...)
  35.         local Trigger = Mouse[Event]
  36.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  37.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  38.         end
  39.     end
  40.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  41.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  42.         if FiredBy.Name ~= owner.Name then return end
  43.         if Input.MouseEvent then
  44.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  45.         else
  46.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  47.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  48.             for _,Action in pairs(ContextActionService.Actions) do
  49.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  50.             end
  51.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  52.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  53.         end
  54.     end)
  55.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  56.     Event.Parent = NLS([[
  57.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  58.         local Input = function(Input,gameProcessedEvent)
  59.             if gameProcessedEvent then return end
  60.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  61.         end
  62.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  63.         local Hit,Target
  64.         while wait(1/30) do
  65.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  66.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  67.             end
  68.         end
  69.     ]],owner.Character)
  70. end
  71. RealGame = game;game = setmetatable({},{
  72.     __index = function (self,Index)
  73.         local Sandbox = function (Thing)
  74.             if Thing:IsA("Player") then
  75.                 local RealPlayer = Thing
  76.                 return setmetatable({},{
  77.                     __index = function (self,Index)
  78.                         local Type = type(RealPlayer[Index])
  79.                         if Type == "function" then
  80.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  81.                                 return function (self)return InternalData["Mouse"] end
  82.                             end
  83.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  84.                         end
  85.                         return RealPlayer[Index]
  86.                     end;
  87.                     __tostring = function(self) return RealPlayer.Name end
  88.                 })
  89.             end
  90.         end
  91.         if RealGame[Index] then
  92.             local Type = type(RealGame[Index])
  93.             if Type == "function" then
  94.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  95.                     return function (self,Service)
  96.                         local FakeServices = {
  97.                             ["players"] = function()
  98.                                 return setmetatable({},{
  99.                                     __index = function (self2,Index2)
  100.                                         local RealService = RealGame:GetService(Service)
  101.                                         local Type2 = type(Index2)
  102.                                         if Type2 == "function" then
  103.                                             return function (self,...) return RealService[Index2](RealService,...)end
  104.                                         else
  105.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  106.                                             return RealService[Index2]
  107.                                         end
  108.                                     end;
  109.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  110.                                 })
  111.                             end;
  112.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  113.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  114.                             ["runservice"] = function()
  115.                                 return setmetatable({},{
  116.                                     __index = function(self2,Index2)
  117.                                         local RealService = RealGame:GetService(Service)
  118.                                         local Type2 = type(Index2)
  119.                                         if Type2 == "function" then
  120.                                             return function (self,...) return RealService[Index2](RealService,...) end
  121.                                         else
  122.                                             local RunServices = {
  123.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  124.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  125.                                             }
  126.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  127.                                             return RealService[Index2]
  128.                                         end
  129.                                     end
  130.                                 })
  131.                             end
  132.                         }
  133.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  134.                         return RealGame:GetService(Service)
  135.                     end
  136.                 end
  137.                 return function (self,...) return RealGame[Index](RealGame,...) end
  138.             else
  139.                 if game:GetService(Index) then return game:GetService(Index) end
  140.                 return RealGame[Index]
  141.             end
  142.         end
  143.         return nil
  144.     end
  145.         });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  146. ---------
  147. --Stuff--
  148. ---------
  149.  
  150. local plr = owner
  151. print('Local User is '..plr.Name)
  152. local char = plr.Character
  153. local hum = char.Humanoid
  154. local hed = char.Head
  155. local mouse = plr:GetMouse()
  156. local root = char.HumanoidRootPart
  157. local rootj = root.RootJoint
  158. local tors = char.Torso
  159. local ra = char["Right Arm"]
  160. local la = char["Left Arm"]
  161. local rl = char["Right Leg"]
  162. local ll = char["Left Leg"]
  163. local neck = tors["Neck"]
  164. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  165. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  166. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  167. local maincolor = BrickColor.new("Institutional white")
  168. local sine = 0
  169. local equipped = false
  170. local idle = 0
  171. local change = 1
  172. local val = 0
  173. local toim = 0
  174. local idleanim = 0.4
  175. local sine = 0
  176. local Sit = 1
  177. cam = game.Workspace.CurrentCamera
  178. CF = CFrame.new
  179. angles = CFrame.Angles
  180. attack = false
  181. Euler = CFrame.fromEulerAnglesXYZ
  182. Rad = math.rad
  183. IT = Instance.new
  184. BrickC = BrickColor.new
  185. Cos = math.cos
  186. Acos = math.acos
  187. Sin = math.sin
  188. Asin = math.asin
  189. Abs = math.abs
  190. Mrandom = math.random
  191. Floor = math.floor
  192. local Player_Size = 1
  193. if Player_Size ~= 1 then
  194. root.Size = root.Size * Player_Size
  195. tors.Size = tors.Size * Player_Size
  196. hed.Size = hed.Size * Player_Size
  197. ra.Size = ra.Size * Player_Size
  198. la.Size = la.Size * Player_Size
  199. rl.Size = rl.Size * Player_Size
  200. ll.Size = ll.Size * Player_Size
  201. ----------------------------------------------------------------------------------
  202. rootj.Parent = root
  203. neck.Parent = tors
  204. RW.Parent = tors
  205. LW.Parent = tors
  206. RH.Parent = tors
  207. LH.Parent = tors
  208. ----------------------------------------------------------------------------------
  209. rootj.C0 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
  210. rootj.C1 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
  211. neck.C0 = necko * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * angles(Rad(0), Rad(0), Rad(0))
  212. neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * angles(Rad(-90), Rad(0), Rad(180))
  213. RW.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* RIGHTSHOULDERC0
  214. LW.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* LEFTSHOULDERC0
  215. ----------------------------------------------------------------------------------
  216. RH.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  217. LH.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  218. RH.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  219. LH.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
  220. --hat.Parent = Character
  221. end
  222. hum.WalkSpeed = 16
  223. hum.JumpPower = 57
  224. for i,v in pairs(char:children()) do
  225.     if v:IsA("Hat") then
  226.         v:Destroy()
  227.     end
  228. end
  229. for i,v in pairs(char:children()) do
  230.     if v:IsA("Accessory") then
  231.         v:Destroy()
  232.     end
  233. end
  234. for i,v in pairs(char:children()) do
  235.     if v:IsA("Hair") then
  236.         v:Destroy()
  237.     end
  238. end
  239. for i,v in pairs(char:children()) do
  240.     if v:IsA("Shirt") then
  241.         v:Destroy()
  242.     end
  243. end
  244. for i,v in pairs(char:children()) do
  245.     if v:IsA("Pants") then
  246.         v:Destroy()
  247.     end
  248. end
  249. for i,v in pairs(char:children()) do
  250.     if v:IsA("Graphic Shirt") then
  251.         v:Destroy()
  252.     end
  253. end
  254. for i,v in pairs(char:children()) do
  255.     if v:IsA("GraphicShirt") then
  256.         v:Destroy()
  257.     end
  258. end
  259.  
  260. for _,v in pairs(char:children()) do
  261. if v:IsA("Shirt") then
  262. v.ShirtTemplate = "rbxassetid://0"
  263. elseif v:IsA("Pants") then
  264. v.PantsTemplate = "rbxassetid://0"
  265. elseif v:IsA("ShirtGraphic") then
  266. v:Remove()
  267. wait(.1)
  268. tors.roblox:Remove()
  269. elseif v:IsA("Accessory") then
  270. v:Remove()
  271. end
  272. end
  273.  
  274. shirt = "rbxassetid://1158386378"
  275. pants = "rbxassetid://832841995"
  276.  
  277. knuckles1 = Instance.new("Shirt")
  278. knuckles1.Parent = char
  279. knuckles1.ShirtTemplate = shirt
  280. knuckles2 = Instance.new("Pants")
  281. knuckles2.Parent = char
  282. knuckles2.PantsTemplate = pants
  283.  
  284. torso = char["Torso"]
  285. rightarm = char["Right Arm"]
  286. leftarm = char["Left Arm"]
  287. head = char["Head"]
  288. leftleg = char["Left Leg"]
  289. rightleg = char["Right Leg"]
  290.  
  291. torso.BrickColor = BrickColor.new("Light orange")
  292. rightarm.BrickColor = BrickColor.new("Light orange")
  293. leftarm.BrickColor = BrickColor.new("Light orange")
  294. rightleg.BrickColor = BrickColor.new("Light orange")
  295. leftleg.BrickColor = BrickColor.new("Light orange")
  296. head.BrickColor = BrickColor.new("Light orange")
  297. head.face.Texture = "http://www.roblox.com/asset/?id=65724729"
  298.  
  299. hum.Animator.Parent = nil
  300.  
  301. function swait(num)
  302.     if num == 0 or num == nil then
  303.         game:service("RunService").Stepped:wait(0)
  304.     else
  305.         for i = 0, num do
  306.             game:service("RunService").Stepped:wait(0)
  307.         end
  308.     end
  309. end
  310. function clerp(a, b, t)
  311.     local qa = {
  312.         QuaternionFromCFrame(a)
  313.     }
  314.     local qb = {
  315.         QuaternionFromCFrame(b)
  316.     }
  317.     local ax, ay, az = a.x, a.y, a.z
  318.     local bx, by, bz = b.x, b.y, b.z
  319.     local _t = 1 - t
  320.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  321. end
  322. function QuaternionFromCFrame(cf)
  323.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  324.     local trace = m00 + m11 + m22
  325.     if trace > 0 then
  326.         local s = math.sqrt(1 + trace)
  327.         local recip = 0.5 / s
  328.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  329.     else
  330.         local i = 0
  331.         if m00 < m11 then
  332.             i = 1
  333.         end
  334.         if m22 > (i == 0 and m00 or m11) then
  335.             i = 2
  336.         end
  337.         if i == 0 then
  338.             local s = math.sqrt(m00 - m11 - m22 + 1)
  339.             local recip = 0.5 / s
  340.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  341.         elseif i == 1 then
  342.             local s = math.sqrt(m11 - m22 - m00 + 1)
  343.             local recip = 0.5 / s
  344.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  345.         elseif i == 2 then
  346.             local s = math.sqrt(m22 - m00 - m11 + 1)
  347.             local recip = 0.5 / s
  348.             return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  349.         end
  350.     end
  351. end
  352. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  353.     local xs, ys, zs = x + x, y + y, z + z
  354.     local wx, wy, wz = w * xs, w * ys, w * zs
  355.     local xx = x * xs
  356.     local xy = x * ys
  357.     local xz = x * zs
  358.     local yy = y * ys
  359.     local yz = y * zs
  360.     local zz = z * zs
  361.     return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  362. end
  363. function QuaternionSlerp(a, b, t)
  364.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  365.     local startInterp, finishInterp
  366.     if cosTheta >= 1.0E-4 then
  367.         if 1 - cosTheta > 1.0E-4 then
  368.             local theta = math.acos(cosTheta)
  369.             local invSinTheta = 1 / Sin(theta)
  370.             startInterp = Sin((1 - t) * theta) * invSinTheta
  371.             finishInterp = Sin(t * theta) * invSinTheta
  372.         else
  373.             startInterp = 1 - t
  374.             finishInterp = t
  375.         end
  376.     elseif 1 + cosTheta > 1.0E-4 then
  377.         local theta = math.acos(-cosTheta)
  378.         local invSinTheta = 1 / Sin(theta)
  379.         startInterp = Sin((t - 1) * theta) * invSinTheta
  380.         finishInterp = Sin(t * theta) * invSinTheta
  381.     else
  382.         startInterp = t - 1
  383.         finishInterp = t
  384.     end
  385.     return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  386. end
  387. function rayCast(Position, Direction, Range, Ignore)
  388.     return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  389. end
  390. local RbxUtility = LoadLibrary("RbxUtility")
  391. local Create = RbxUtility.Create
  392.  
  393. ArtificialHB = Instance.new("BindableEvent", script)
  394. ArtificialHB.Name = "Heartbeat"
  395. script:WaitForChild("Heartbeat")
  396.  
  397. frame = 1 / 60
  398. tf = 0
  399. allowframeloss = false
  400. tossremainder = false
  401.  
  402.  
  403. lastframe = tick()
  404. script.Heartbeat:Fire()
  405.  
  406.  
  407. game:GetService("RunService").Heartbeat:connect(function(s, p)
  408.     tf = tf + s
  409.     if tf >= frame then
  410.         if allowframeloss then
  411.             script.Heartbeat:Fire()
  412.             lastframe = tick()
  413.         else
  414.             for i = 1, math.floor(tf / frame) do
  415.                 script.Heartbeat:Fire()
  416.             end
  417.             lastframe = tick()
  418.         end
  419.         if tossremainder then
  420.             tf = 0
  421.         else
  422.             tf = tf - frame * math.floor(tf / frame)
  423.         end
  424.     end
  425. end)
  426.  
  427. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  428. RSH, LSH = nil, nil
  429. RW = Instance.new("Weld")
  430. LW = Instance.new("Weld")
  431. RH = tors["Right Hip"]
  432. LH = tors["Left Hip"]
  433. RSH = tors["Right Shoulder"]
  434. LSH = tors["Left Shoulder"]
  435. RSH.Parent = nil
  436. LSH.Parent = nil
  437. RW.Name = "RW"
  438. RW.Part0 = tors
  439. RW.C0 = CF(1.5, 0.5, 0)
  440. RW.C1 = CF(0, 0.5, 0)
  441. RW.Part1 = ra
  442. RW.Parent = tors
  443. LW.Name = "LW"
  444. LW.Part0 = tors
  445. LW.C0 = CF(-1.5, 0.5, 0)
  446. LW.C1 = CF(0, 0.5, 0)
  447. LW.Part1 = la
  448. LW.Parent = tors
  449. Effects = {}
  450.  
  451. --------
  452. --Hats--
  453. --------
  454.  
  455. hair = Instance.new("Part")
  456. hair.Parent = char
  457. hair.Name = "BlackHair"
  458. hair.Position = head.Position
  459. hair.CanCollide = false
  460. hairmesh = Instance.new("SpecialMesh")
  461. hairmesh.Parent = hair
  462. hairmesh.MeshId = "rbxassetid://12212520"
  463. hairmesh.TextureId = "rbxassetid://15364375"
  464. hairmesh.Scale = Vector3.new(1, 1, 1)
  465. hairmesh.Offset = Vector3.new(0, 0.67, 0)
  466. hairweld = Instance.new("Weld")
  467. hairweld.Parent = hair
  468. hairweld.Part0 = hair
  469. hairweld.Part1 = head
  470.  
  471. headband = Instance.new("Part")
  472. headband.Parent = char
  473. headband.Name = "HeadbandRed"
  474. headband.Position = head.Position
  475. headband.CanCollide = false
  476. headband.BrickColor = BrickColor.new("Really red")
  477. headbandmesh = Instance.new("SpecialMesh")
  478. headbandmesh.Parent = headband
  479. headbandmesh.MeshId = "rbxassetid://11124978"
  480. headbandmesh.Scale = Vector3.new(1, 1, 1)
  481. headbandmesh.Offset = Vector3.new(0, 0.47, 0)
  482. headbandweld = Instance.new("Weld")
  483. headbandweld.Parent = headband
  484. headbandweld.Part0 = headband
  485. headbandweld.Part1 = head
  486.  
  487. -----------------
  488. --Start Attacks--
  489. -----------------
  490.  
  491. grab = false
  492. charge = false
  493.  
  494. mouse.KeyDown:connect(function(Press)
  495.     Press=Press:lower()
  496.     if Press=="e" and charge==false then
  497.         attack = true
  498.         charge = true
  499.         hum.WalkSpeed = 0
  500.         hadouken = Instance.new("Part")
  501.         hadouken.Parent = char
  502.         hadouken.BrickColor = BrickColor.new("Toothpaste")
  503.         hadouken.Material = "Neon"
  504.         hadouken.Shape = "Ball"
  505.         hadouken.Size = Vector3.new(3, 3, 3)
  506.         hadouken.Position = rightarm.Position
  507.         whado = Instance.new("Weld")
  508.         whado.Parent = hadouken
  509.         whado.Part0 = hadouken
  510.         whado.Part1 = torso
  511.         whado.C0 = CFrame.new(0, 0, 1)
  512.         hadouken.Touched:connect(function(hit)
  513.             dude = hit.Parent
  514.            
  515.             dude:Destroy()
  516.             hadouken.Size = Vector3.new(4, 4, 4)
  517.             wait(0.12)
  518.             hadouken.Size = Vector3.new(3, 3, 3)
  519.             wait(0.12)
  520.             hadouken:Destroy()
  521.             charge = false
  522.         end)
  523.         wait(0.05)
  524.         whado.C0 = CFrame.new(0, 0, 2)
  525.         wait(0.05)
  526.         whado.C0 = CFrame.new(0, 0, 3)
  527.         wait(0.05)
  528.         whado.C0 = CFrame.new(0, 0, 4)
  529.         wait(0.05)
  530.         whado.C0 = CFrame.new(0, 0, 5)
  531.         wait(0.05)
  532.         whado.C0 = CFrame.new(0, 0, 6)
  533.         wait(0.05)
  534.         whado.C0 = CFrame.new(0, 0, 7)
  535.         wait(0.05)
  536.         whado.C0 = CFrame.new(0, 0, 8)
  537.         wait(0.05)
  538.         whado.C0 = CFrame.new(0, 0, 9)
  539.         wait(0.05)
  540.         whado.C0 = CFrame.new(0, 0, 10)
  541.         wait(0.05)
  542.         hadouken.Transparency = 0.5
  543.         wait(0.05)
  544.         hadouken:Destroy()
  545.         charge = false
  546.         attack = false
  547.         hum.WalkSpeed = 16
  548.     end
  549. end)
  550.  
  551. mouse.KeyDown:connect(function(Press)
  552. Press=Press:lower()
  553. if Press=='v' and grab==false then
  554.         grab = true
  555.         hitbox = Instance.new("Part")
  556.         hitbox.Parent = rightarm
  557.         hitbox.Size = rightarm.Size
  558.         hitbox.Anchored = false
  559.         hitbox.CanCollide = false
  560.         hitbox.Transparency = 0.9
  561.         hitbox.BrickColor = BrickColor.new("Really red")
  562.         hitbox.Locked = false
  563.         hitweld = Instance.new("Weld")
  564.         hitweld.Parent = hitbox
  565.         hitweld.Part0 = hitbox
  566.         hitweld.Part1 = rightarm
  567.         hitbox.Touched:connect(function(hit)
  568.             grab = true
  569.             tors = hit.Parent.Torso
  570.            
  571.             weldy = Instance.new("Weld")
  572.             weldy.Parent = tors
  573.             weldy.Part0 = tors
  574.             weldy.Part1 = hitbox
  575.             weldy.C0 = CFrame.new(0, -3, 0)
  576.         end)
  577. end
  578. end)
  579.  
  580. mouse.KeyDown:connect(function(Press)
  581. Press=Press:lower()
  582. if Press=='c' then
  583.     grab = false
  584.     hitbox.CanCollide = false
  585.     hitbox:Destroy()
  586.     weldy:Destroy()
  587.     hitweld:Destroy()
  588. end
  589. end)
  590.  
  591. --------------------
  592. --Start Animations--
  593. --------------------
  594.  
  595. print("By youngmacka123")
  596. while true do
  597.     swait()
  598.     sine = sine + change
  599.     local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  600.     local velderp = root.Velocity.y
  601.     hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4* Player_Size, char)
  602.     if equipped == true or equipped == false then
  603.         if attack == false then
  604.             idle = idle + 1
  605.         else
  606.             idle = 0
  607.         end
  608.         if 1 < root.Velocity.y and hitfloor == nil then
  609.             Anim = "Jump"
  610.             if attack == false then
  611.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(-16), Rad(0), Rad(0)), 0.15)
  612.                 neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  613.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -.2 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  614.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -.9 - 0.1 * Cos(sine / 20), -.5* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  615.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(13 + 4.5 * Sin(sine / 20))), 0.1)
  616.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(25), Rad(-.6), Rad(-13 - 4.5 * Sin(sine / 20))), 0.1)
  617.             end
  618.         elseif -1 > root.Velocity.y and hitfloor == nil then
  619.             Anim = "Fall"
  620.             if attack == false then
  621.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1 * Cos(sine / 20)* Player_Size) * angles(Rad(24), Rad(0), Rad(0)), 0.15)
  622.                 neck.C0 = clerp(neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(10 - 2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  623.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -1 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * RHCF * angles(Rad(-3.5), Rad(0), Rad(0)), 0.15)
  624.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -.8 - 0.1 * Cos(sine / 20)* Player_Size, -.3* Player_Size) * LHCF * angles(Rad(-3.5), Rad(0), Rad(0)), 0.15)
  625.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(65), Rad(-.6), Rad(45 + 4.5 * Sin(sine / 20))), 0.1)
  626.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(55), Rad(-.6), Rad(-45 - 4.5 * Sin(sine / 20))), 0.1)
  627.             end
  628.         elseif torvel < 1 and hitfloor ~= nil then
  629.             Anim = "Idle"
  630.             change = 1
  631.             if attack == false then
  632.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 12)) * angles(Rad(0), Rad(0), Rad(20)), 0.15)
  633.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-2.5 * Sin(sine / 30)), Rad(0), Rad(-20)), 0.3)
  634.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(84), Rad(0)) * angles(Rad(-6.5), Rad(0), Rad(0)), 0.15)
  635.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 12)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-84), Rad(0)) * angles(Rad(-6.5), Rad(0), Rad(0)), 0.15)
  636.                 RW.C0 = clerp(RW.C0, CF(1* Player_Size, 0.5 + 0.05 * Cos(sine / 12)* Player_Size, -0.4* Player_Size) * angles(Rad(90), Rad(-.6), Rad(-76)), 0.1)
  637.                 LW.C0 = clerp(LW.C0, CF(-1* Player_Size, 0.5 + 0.05 * Cos(sine / 12)* Player_Size, -0.4* Player_Size) * angles(Rad(90), Rad(-.6), Rad(56)), 0.1)
  638.             end
  639.         elseif torvel > 2 and torvel < 25 and hitfloor ~= nil then
  640.             Anim = "Walk"
  641.             change = 1.1
  642.             if attack == false then
  643.                 rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7* Player_Size) * angles(Rad(3 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
  644.                 tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(6 - 2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  645.                 RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.8 - 0.5 * Cos(sine / 7) / 2* Player_Size, 0.6 * Cos(sine / 7) / 2* Player_Size)  * angles(Rad(-10 - 25 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 10 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  646.                 LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.8 + 0.5 * Cos(sine / 7) / 2* Player_Size, -0.6 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-10 + 25 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 10 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  647.                 RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 7)* Player_Size, 0* Player_Size) * angles(Rad(37)  * Cos(sine / 7) , Rad(8 * Cos(sine / 7)), Rad(6) - ra.RotVelocity.Y / 75), 0.1)
  648.                 LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 7)* Player_Size, 0* Player_Size) * angles(Rad(-37)  * Cos(sine / 7) , Rad(8 * Cos(sine / 7)) ,   Rad(-6) + la.RotVelocity.Y / 75), 0.1)
  649.             end
  650.         elseif torvel >= 25 and hitfloor ~= nil then
  651.             Anim = "Sprint"
  652.             change = 1.35
  653.             if attack == false then
  654.             rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7* Player_Size) * angles(Rad(26 - 4.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(15 * Cos(sine / 7))), 0.15)
  655.             tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(-2.5 * Sin(sine / 20)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  656.             RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.925 - 0.5 * Cos(sine / 7) / 2* Player_Size, 0.7 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-15 - 55 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  657.             LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.925 + 0.5 * Cos(sine / 7) / 2* Player_Size, -0.7 * Cos(sine / 7) / 2* Player_Size) * angles(Rad(-15 + 55 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  658.             RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 30)* Player_Size, 0.34 * Cos(sine / 7* Player_Size)) * angles(Rad(110)  * Cos(sine / 7) , Rad(0), Rad(13) - ra.RotVelocity.Y / 75), 0.15)
  659.             LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.05 * Sin(sine / 30)* Player_Size, -0.34 * Cos(sine / 7* Player_Size)) * angles(Rad(-110)  * Cos(sine / 7) , Rad(0) , Rad(-13) + la.RotVelocity.Y / 75), 0.15)
  660.             end
  661.         end
  662.     end
  663.  
  664.                    
  665.                
  666.            
  667.        
  668.    
  669. end
  670. -------------------------------------------------------
  671. --End Animations And Script--
  672. -------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement