sneakydodge123

fox

Jun 30th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.92 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility: by WaverlyCole & Mokiros")
  3. InternalData = {}
  4. do
  5. script.Parent = owner.Character
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10. return Fake
  11. end
  12. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17. local function TriggerEvent(self,Event,...)
  18. local Trigger = Mouse[Event]
  19. if Trigger and Trigger.fakeEvent and Trigger.Function then
  20. Trigger.Function(...)
  21. end
  22. end
  23. Mouse.TrigEvent = TriggerEvent
  24. UserInputService.TrigEvent = TriggerEvent
  25. Event.OnServerEvent:Connect(function(FiredBy,Input)
  26. if FiredBy.Name ~= owner.Name then end
  27. if Input.MouseEvent then
  28. Mouse.Target = Input.Target
  29. Mouse.Hit = Input.Hit
  30. else
  31. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34. end
  35. for _,Action in pairs(ContextActionService.Actions) do
  36. for _,Key in pairs(Action.Keys) do
  37. if Key==Input.KeyCode then
  38. Action.Function(Action.Name,Input.UserInputState,Input)
  39. end
  40. end
  41. end
  42. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44. end
  45. end)
  46. InternalData["Mouse"] = Mouse
  47. InternalData["ContextActionService"] = ContextActionService
  48. InternalData["UserInputService"] = UserInputService
  49. Event.Parent = NLS([[
  50. local Player = owner
  51. local Event = script:WaitForChild("UserInput")
  52. local UserInputService = game:GetService("UserInputService")
  53. local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input)
  59. UserInputService.InputEnded:Connect(Input)
  60. local Hit,Target
  61. while wait(1/30) do
  62. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63. Hit,Target = Mouse.Hit,Mouse.Target
  64. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)
  80. return InternalData["Mouse"]
  81. end
  82. end
  83. return function (self,...)
  84. return RealPlayer[Index](RealPlayer,...)
  85. end
  86. else
  87. return RealPlayer[Index]
  88. end
  89. end;
  90. __tostring = function(self)
  91. return RealPlayer.Name
  92. end
  93. })
  94. end
  95. end
  96. if RealGame[Index] then
  97. local Type = type(RealGame[Index])
  98. if Type == "function" then
  99. if Index:lower() == "getservice" or Index:lower() == "service" then
  100. return function (self,Service)
  101. if Service:lower() == "players" then
  102. return setmetatable({},{
  103. __index = function (self2,Index2)
  104. local RealService = RealGame:GetService(Service)
  105. local Type2 = type(Index2)
  106. if Type2 == "function" then
  107. return function (self,...)
  108. return RealService[Index2](RealService,...)
  109. end
  110. else
  111. if Index2:lower() == "localplayer" then
  112. return Sandbox(owner)
  113. end
  114. return RealService[Index2]
  115. end
  116. end;
  117. __tostring = function(self)
  118. return RealGame:GetService(Service).Name
  119. end
  120. })
  121. elseif Service:lower() == "contextactionservice" then
  122. return InternalData["ContextActionService"]
  123. elseif Service:lower() == "contextactionservice" then
  124. return InternalData["UserInputService"]
  125. elseif Service:lower() == "runservice" then
  126. return setmetatable({},{
  127. __index = function(self2,Index2)
  128. local RealService = RealGame:GetService(Service)
  129. local Type2 = type(Index2)
  130. if Type2 == "function" then
  131. return function (self,...)
  132. return RealService[Index2](RealService,...)
  133. end
  134. else
  135. if Index2:lower() == "bindtorenderstep" then
  136. return function (self,Name,Priority,Function)
  137. return RealGame:GetService("RunService").Stepped:Connect(Function)
  138. end
  139. end
  140. if Index2:lower() == "renderstepped" then
  141. return RealService["Stepped"]
  142. end
  143. return RealService[Index2]
  144. end
  145. end
  146. })
  147. else
  148. return RealGame:GetService(Service)
  149. end
  150. end
  151. end
  152. return function (self,...)
  153. return RealGame[Index](RealGame,...)
  154. end
  155. else
  156. if game:GetService(Index) then
  157. return game:GetService(Index)
  158. end
  159. return RealGame[Index]
  160. end
  161. else
  162. return nil
  163. end
  164. end
  165. });Game = game;owner = game:GetService("Players").LocalPlayer
  166. print("Complete! Running...")
  167.  
  168. local Player = game.Players.localPlayer
  169. local Character = Player.Character
  170. local red = 255
  171. local green = 255
  172. local blue = 255
  173. local Humanoid = Character.Humanoid
  174. local mouse = Player:GetMouse()
  175. local m = Instance.new("Model", Character)
  176. m.Name = "WeaponModel"
  177. local LeftArm = Character["Left Arm"]
  178. local RightArm = Character["Right Arm"]
  179. local LeftLeg = Character["Left Leg"]
  180. local RightLeg = Character["Right Leg"]
  181. local Head = Character.Head
  182. local Torso = Character.Torso
  183. local cam = game.Workspace.CurrentCamera
  184. local RootPart = Character.HumanoidRootPart
  185. local RootJoint = RootPart.RootJoint
  186. local equipped = false
  187. local attack = false
  188. local Anim = "Idle"
  189. local idle = 0
  190. local attacktype = 1
  191. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  192. local velocity = RootPart.Velocity.y
  193. local sine = 0
  194. local change = 1
  195. local grabbed = false
  196. local cn = CFrame.new
  197. local mr = math.rad
  198. local angles = CFrame.Angles
  199. local ud = UDim2.new
  200. local c3 = Color3.new
  201. local lim = 0
  202. local st = 0
  203. local necko = cn(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  204. local attacktype = 1
  205. local ZTarget, RocketTarget = nil, nil
  206. local euler = CFrame.fromEulerAnglesXYZ
  207. function clerp(a,b,t)
  208. local qa = {QuaternionFromCFrame(a)}
  209. local qb = {QuaternionFromCFrame(b)}
  210. local ax, ay, az = a.x, a.y, a.z
  211. local bx, by, bz = b.x, b.y, b.z
  212. local _t = 1-t
  213. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  214. end
  215.  
  216. function QuaternionFromCFrame(cf)
  217. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  218. local trace = m00 + m11 + m22
  219. if trace > 0 then
  220. local s = math.sqrt(1 + trace)
  221. local recip = 0.5/s
  222. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  223. else
  224. local i = 0
  225. if m11 > m00 then
  226. i = 1
  227. end
  228. if m22 > (i == 0 and m00 or m11) then
  229. i = 2
  230. end
  231. if i == 0 then
  232. local s = math.sqrt(m00-m11-m22+1)
  233. local recip = 0.5/s
  234. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  235. elseif i == 1 then
  236. local s = math.sqrt(m11-m22-m00+1)
  237. local recip = 0.5/s
  238. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  239. elseif i == 2 then
  240. local s = math.sqrt(m22-m00-m11+1)
  241. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  242. end
  243. end
  244. end
  245.  
  246. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  247. local xs, ys, zs = x + x, y + y, z + z
  248. local wx, wy, wz = w*xs, w*ys, w*zs
  249. local xx = x*xs
  250. local xy = x*ys
  251. local xz = x*zs
  252. local yy = y*ys
  253. local yz = y*zs
  254. local zz = z*zs
  255. 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))
  256. end
  257.  
  258. function QuaternionSlerp(a, b, t)
  259. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  260. local startInterp, finishInterp;
  261. if cosTheta >= 0.0001 then
  262. if (1 - cosTheta) > 0.0001 then
  263. local theta = math.acos(cosTheta)
  264. local invSinTheta = 1/math.sin(theta)
  265. startInterp = math.sin((1-t)*theta)*invSinTheta
  266. finishInterp = math.sin(t*theta)*invSinTheta
  267. else
  268. startInterp = 1-t
  269. finishInterp = t
  270. end
  271. else
  272. if (1+cosTheta) > 0.0001 then
  273. local theta = math.acos(-cosTheta)
  274. local invSinTheta = 1/math.sin(theta)
  275. startInterp = math.sin((t-1)*theta)*invSinTheta
  276. finishInterp = math.sin(t*theta)*invSinTheta
  277. else
  278. startInterp = t-1
  279. finishInterp = t
  280. end
  281. end
  282. 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
  283. end
  284. rayCast = function(Position, Direction, Range, Ignore)
  285. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  286. end
  287. local v = game.Players.localPlayer
  288. local torso = v.Character.Torso
  289. wait(1)
  290. local p = Instance.new("Part", v.Character)
  291. p.Name = "kit"
  292. p.Anchored = true
  293. p.Transparency = 0
  294. p.Material = "Plastic"
  295. p.CanCollide = false
  296. p.TopSurface = 0
  297. p.BottomSurface = 0
  298. p.Size = Vector3.new(0.2, 0.2, 0.2)
  299. p.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  300. local msh = Instance.new("SpecialMesh", p)
  301. msh.Scale = Vector3.new(-2, 2, 2)
  302. msh.MeshId = "http://www.roblox.com/asset/?id=188635159"
  303. msh.TextureId = "http://www.roblox.com/asset/?id=188539332"
  304. msh.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  305. local pn = Instance.new("Part", v.Character.kit)
  306. pn.Name = "tail"
  307. pn.Anchored = true
  308. pn.Transparency = 0
  309. pn.Material = "Plastic"
  310. pn.CanCollide = false
  311. pn.TopSurface = 0
  312. pn.BottomSurface = 0
  313. pn.Size = Vector3.new(5, 3, 3)
  314. pn.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  315. local mshn = Instance.new("SpecialMesh", pn)
  316. mshn.Scale = Vector3.new(2, 2, 2)
  317. mshn.MeshId = "http://www.roblox.com/asset/?id=188635159"
  318. mshn.TextureId = "http://www.roblox.com/asset/?id=188539332"
  319. mshn.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  320. local pn3 = Instance.new("Part", v.Character.kit)
  321. pn3.Name = "tail"
  322. pn3.Anchored = true
  323. pn3.Transparency = 0
  324. pn3.Material = "Plastic"
  325. pn3.CanCollide = false
  326. pn3.TopSurface = 0
  327. pn3.BottomSurface = 0
  328. pn3.Size = Vector3.new(0.2, 0.2, 0.2)
  329. pn3.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  330. local mshn3 = Instance.new("SpecialMesh", pn3)
  331. mshn3.Scale = Vector3.new(2, 2, 2)
  332. mshn3.MeshId = "http://www.roblox.com/asset/?id=188635159"
  333. mshn3.TextureId = "http://www.roblox.com/asset/?id=188539332"
  334. mshn3.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  335. local pn4 = Instance.new("Part", v.Character.kit)
  336. pn4.Name = "tail"
  337. pn4.Anchored = true
  338. pn4.Transparency = 0
  339. pn4.Material = "Plastic"
  340. pn4.CanCollide = false
  341. pn4.TopSurface = 0
  342. pn4.BottomSurface = 0
  343. pn4.Size = Vector3.new(0.2, 0.2, 0.2)
  344. pn4.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  345. local mshn4 = Instance.new("SpecialMesh", pn4)
  346. mshn4.Scale = Vector3.new(-2, 2, 2)
  347. mshn4.MeshId = "http://www.roblox.com/asset/?id=188635159"
  348. mshn4.TextureId = "http://www.roblox.com/asset/?id=188539332"
  349. mshn4.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  350. local pn5 = Instance.new("Part", v.Character.kit)
  351. pn5.Name = "tail"
  352. pn5.Anchored = true
  353. pn5.Transparency = 0
  354. pn5.Material = "Plastic"
  355. pn5.CanCollide = false
  356. pn5.TopSurface = 0
  357. pn5.BottomSurface = 0
  358. pn5.Size = Vector3.new(0.2, 0.2, 0.2)
  359. pn5.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  360. local mshn5 = Instance.new("SpecialMesh", pn5)
  361. mshn5.Scale = Vector3.new(2, 2, 2)
  362. mshn5.MeshId = "http://www.roblox.com/asset/?id=188635159"
  363. mshn5.TextureId = "http://www.roblox.com/asset/?id=188539332"
  364. mshn5.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  365. local pn6 = Instance.new("Part", v.Character.kit)
  366. pn6.Name = "tail"
  367. pn6.Anchored = true
  368. pn6.Transparency = 0
  369. pn6.Material = "Plastic"
  370. pn6.CanCollide = false
  371. pn6.TopSurface = 0
  372. pn6.BottomSurface = 0
  373. pn6.Size = Vector3.new(0.2, 0.2, 0.2)
  374. pn6.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  375. local mshn6 = Instance.new("SpecialMesh", pn6)
  376. mshn6.Scale = Vector3.new(2, 2, 2)
  377. mshn6.MeshId = "http://www.roblox.com/asset/?id=188635159"
  378. mshn6.TextureId = "http://www.roblox.com/asset/?id=188539332"
  379. mshn6.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  380. local pn7 = Instance.new("Part", v.Character.kit)
  381. pn7.Name = "tail"
  382. pn7.Anchored = true
  383. pn7.Transparency = 0
  384. pn7.Material = "Plastic"
  385. pn7.CanCollide = false
  386. pn7.TopSurface = 0
  387. pn7.BottomSurface = 0
  388. pn7.Size = Vector3.new(0.2, 0.2, 0.2)
  389. pn7.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  390. local mshn7 = Instance.new("SpecialMesh", pn7)
  391. mshn7.Scale = Vector3.new(2, 2, 2)
  392. mshn7.MeshId = "http://www.roblox.com/asset/?id=188635159"
  393. mshn7.TextureId = "http://www.roblox.com/asset/?id=188539332"
  394. mshn7.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  395. local pn8 = Instance.new("Part", v.Character.kit)
  396. pn8.Name = "tail"
  397. pn8.Anchored = true
  398. pn8.Transparency = 0
  399. pn8.Material = "Plastic"
  400. pn8.CanCollide = false
  401. pn8.TopSurface = 0
  402. pn8.BottomSurface = 0
  403. pn8.Size = Vector3.new(0.2, 0.2, 0.2)
  404. pn8.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  405. local mshn8 = Instance.new("SpecialMesh", pn8)
  406. mshn8.Scale = Vector3.new(-2, 2, 2)
  407. mshn8.MeshId = "http://www.roblox.com/asset/?id=188635159"
  408. mshn8.TextureId = "http://www.roblox.com/asset/?id=188539332"
  409. mshn8.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  410. local pn9 = Instance.new("Part", v.Character.kit)
  411. pn9.Name = "tail"
  412. pn9.Anchored = true
  413. pn9.Transparency = 0
  414. pn9.Material = "Plastic"
  415. pn9.CanCollide = false
  416. pn9.TopSurface = 0
  417. pn9.BottomSurface = 0
  418. pn9.Size = Vector3.new(0.2, 0.2, 0.2)
  419. pn9.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  420. local mshn9 = Instance.new("SpecialMesh", pn9)
  421. mshn9.Scale = Vector3.new(-2, 2, 2)
  422. mshn9.MeshId = "http://www.roblox.com/asset/?id=188635159"
  423. mshn9.TextureId = "http://www.roblox.com/asset/?id=188539332"
  424. mshn9.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  425. local pn0 = Instance.new("Part", v.Character.kit)
  426. pn0.Name = "ears"
  427. pn0.Anchored = true
  428. pn0.Transparency = 0
  429. pn0.Material = "Plastic"
  430. pn0.CanCollide = false
  431. pn0.TopSurface = 0
  432. pn0.BottomSurface = 0
  433. pn0.Size = Vector3.new(0.2, 0.2, 0.2)
  434. pn0.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
  435. local mshn0 = Instance.new("SpecialMesh", pn0)
  436. mshn0.Scale = Vector3.new(0.5, 0.5, 0.5)
  437. mshn0.MeshId = "http://www.roblox.com/asset/?id=361948302"
  438. mshn0.TextureId = "http://www.roblox.com/asset/?id=50657528"
  439. mshn0.VertexColor = Vector3.new(torso.BrickColor.r, torso.BrickColor.g, torso.BrickColor.b)
  440. p.Anchored = false
  441. local motor1 = Instance.new("Weld", p)
  442. motor1.Part0 = p
  443. motor1.Part1 = torso
  444. motor1.C0 = CFrame.new(2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  445. motor1.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  446. pn.Anchored = false
  447. local motor2 = Instance.new("Weld", pn)
  448. motor2.Part0 = pn
  449. motor2.Part1 = torso
  450. motor2.C0 = CFrame.new(-2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  451. motor2.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  452. pn3.Anchored = false
  453. local motor3 = Instance.new("Weld", pn3)
  454. motor3.Part0 = pn3
  455. motor3.Part1 = torso
  456. motor3.C0 = CFrame.new(-2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  457. motor3.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  458. pn4.Anchored = false
  459. local motor4 = Instance.new("Weld", pn4)
  460. motor4.Part0 = pn4
  461. motor4.Part1 = torso
  462. motor4.C0 = CFrame.new(2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  463. motor4.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  464. pn5.Anchored = false
  465. local motor5 = Instance.new("Weld", pn5)
  466. motor5.Part0 = pn5
  467. motor5.Part1 = torso
  468. motor5.C0 = CFrame.new(-2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  469. motor5.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  470. pn6.Anchored = false
  471. local motor6 = Instance.new("Weld", pn6)
  472. motor6.Part0 = pn6
  473. motor6.Part1 = torso
  474. motor6.C0 = CFrame.new(-2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  475. motor6.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  476. pn7.Anchored = false
  477. local motor7 = Instance.new("Weld", pn7)
  478. motor7.Part0 = pn7
  479. motor7.Part1 = torso
  480. motor7.C0 = CFrame.new(-2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  481. motor7.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  482. pn8.Anchored = false
  483. local motor8 = Instance.new("Weld", pn8)
  484. motor8.Part0 = pn8
  485. motor8.Part1 = torso
  486. motor8.C0 = CFrame.new(2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  487. motor8.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  488. pn9.Anchored = false
  489. local motor9 = Instance.new("Weld", pn9)
  490. motor9.Part0 = pn9
  491. motor9.Part1 = torso
  492. motor9.C0 = CFrame.new(2.36, -1.8, -0.87) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  493. motor9.C1 = CFrame.new(0, -1, 0.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  494. pn0.Anchored = false
  495. local motor0 = Instance.new("Weld", pn0)
  496. motor0.Part0 = pn0
  497. motor0.Part1 = v.Character.Head
  498. motor0.C0 = CFrame.new(0, -0.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  499. game:GetService("RunService").Stepped:connect(function()
  500. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  501. velocity = RootPart.Velocity.y
  502. sine = sine + change
  503. local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  504. if equipped == true or equipped == false then
  505. if RootPart.Velocity.y > 1 and hit == nil then
  506. Anim = "Jump"
  507. if attack == false then
  508. motor1.C0 = clerp(motor1.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(-90 + 0 * math.cos(sine / 10)), math.rad(80 + 0 * math.cos(sine / 25))), 0.1)
  509. motor2.C0 = clerp(motor2.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(90 + 0 * math.cos(sine / 10)), math.rad(-80 + 0 * math.cos(sine / 25))), 0.1)
  510. motor3.C0 = clerp(motor3.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(90 + 0 * math.cos(sine / 10)), math.rad(-110 + 0 * math.cos(sine / 25))), 0.1)
  511. motor4.C0 = clerp(motor4.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(-90 + 0 * math.cos(sine / 10)), math.rad(110 + 0 * math.cos(sine / 25))), 0.1)
  512. motor5.C0 = clerp(motor5.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(90 + 0 * math.cos(sine / 10)), math.rad(-80 + 0 * math.cos(sine / 25))), 0.1)
  513. motor6.C0 = clerp(motor6.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(90 + 0 * math.cos(sine / 10)), math.rad(-80 + 0 * math.cos(sine / 25))), 0.1)
  514. motor7.C0 = clerp(motor7.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(90 + 0 * math.cos(sine / 10)), math.rad(-80 + 0 * math.cos(sine / 25))), 0.1)
  515. motor8.C0 = clerp(motor8.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(-90 + 0 * math.cos(sine / 10)), math.rad(80 + 0 * math.cos(sine / 25))), 0.1)
  516. motor9.C0 = clerp(motor9.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + 0 * math.cos(sine / 10)), math.rad(-90 + 0 * math.cos(sine / 10)), math.rad(80 + 0 * math.cos(sine / 25))), 0.1)
  517. end
  518. else
  519. if RootPart.Velocity.y < -1 and hit == nil then
  520. Anim = "Fall"
  521. if attack == false then
  522. motor1.C0 = clerp(motor1.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(70 + 0 * math.cos(sine / 25))), 0.1)
  523. motor2.C0 = clerp(motor2.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(-70 + 0 * math.cos(sine / 25))), 0.1)
  524. motor3.C0 = clerp(motor3.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(-70 + 0 * math.cos(sine / 25))), 0.1)
  525. motor4.C0 = clerp(motor4.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(70 + 0 * math.cos(sine / 25))), 0.1)
  526. motor5.C0 = clerp(motor5.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(-70 + 0 * math.cos(sine / 25))), 0.1)
  527. motor6.C0 = clerp(motor6.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(-70 + 0 * math.cos(sine / 25))), 0.1)
  528. motor7.C0 = clerp(motor7.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(-70 + 0 * math.cos(sine / 25))), 0.1)
  529. motor8.C0 = clerp(motor8.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(70 + 0 * math.cos(sine / 25))), 0.1)
  530. motor9.C0 = clerp(motor9.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-45 + 0 * math.cos(sine / 10)), math.rad(0 + 0 * math.cos(sine / 10)), math.rad(70 + 0 * math.cos(sine / 25))), 0.1)
  531. end
  532. else
  533. if Torsovelocity < 1 and hit ~= nil then
  534. Anim = "Idle"
  535. if attack == false then
  536. change = 1
  537. motor1.C0 = clerp(motor1.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-5 + 5 * math.cos(sine / 50)), math.rad(0 + 5 * math.cos(sine / 80)), math.rad(0 + 0 * math.cos(sine / 25))), 0.1)
  538. motor2.C0 = clerp(motor2.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-5 + -5 * math.cos(sine / 70)), math.rad(0 + -5 * math.cos(sine / 50)), math.rad(0 + 0 * math.cos(sine / 25))), 0.1)
  539. motor3.C0 = clerp(motor3.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-5 + -5 * math.cos(sine / 80)), math.rad(0 + 5 * math.cos(sine / 65)), math.rad(-50 + 0 * math.cos(sine / 25))), 0.1)
  540. motor4.C0 = clerp(motor4.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(0 + 5 * math.cos(sine / 40)), math.rad(0 + 5 * math.cos(sine / 70)), math.rad(-40 + 0 * math.cos(sine / 25))), 0.1)
  541. motor5.C0 = clerp(motor5.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(0 + 5 * math.cos(sine / 60)), math.rad(0 + 5 * math.cos(sine / 65)), math.rad(40 + 0 * math.cos(sine / 25))), 0.1)
  542. motor6.C0 = clerp(motor6.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-50 + 5 * math.cos(sine / 35)), math.rad(0 + 5 * math.cos(sine / 70)), math.rad(0 + 0 * math.cos(sine / 25))), 0.1)
  543. motor7.C0 = clerp(motor7.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-50 + 5 * math.cos(sine / 70)), math.rad(0 + 5 * math.cos(sine / 35)), math.rad(-45 + 0 * math.cos(sine / 25))), 0.1)
  544. motor8.C0 = clerp(motor8.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-50 + 5 * math.cos(sine / 55)), math.rad(0 + 5 * math.cos(sine / 55)), math.rad(-10 + 0 * math.cos(sine / 25))), 0.1)
  545. motor9.C0 = clerp(motor9.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-50 + 5 * math.cos(sine / 65)), math.rad(0 + 5 * math.cos(sine / 60)), math.rad(35 + 0 * math.cos(sine / 25))), 0.1)
  546. end
  547. else
  548. if Torsovelocity > 2 and hit ~= nil then
  549. Anim = "Walk"
  550. if attack == false then
  551. motor1.C0 = clerp(motor1.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + -10 * math.cos(sine / 10)), math.rad(-45 + 10 * math.cos(sine / 10)), math.rad(45 + 0 * math.cos(sine / 10))), 0.1)
  552. motor2.C0 = clerp(motor2.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 10 * math.cos(sine / 10)), math.rad(45 + 10 * math.cos(sine / 10)), math.rad(-45 + 0 * math.cos(sine / 10))), 0.1)
  553. motor3.C0 = clerp(motor3.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 10 * math.cos(sine / 10)), math.rad(45 + 10 * math.cos(sine / 10)), math.rad(-45 + 0 * math.cos(sine / 10))), 0.1)
  554. motor4.C0 = clerp(motor4.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + -10 * math.cos(sine / 10)), math.rad(-45 + 10 * math.cos(sine / 10)), math.rad(45 + 0 * math.cos(sine / 10))), 0.1)
  555. motor5.C0 = clerp(motor5.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 10 * math.cos(sine / 10)), math.rad(45 + 10 * math.cos(sine / 10)), math.rad(-45 + 0 * math.cos(sine / 10))), 0.1)
  556. motor6.C0 = clerp(motor6.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 10 * math.cos(sine / 10)), math.rad(45 + 10 * math.cos(sine / 10)), math.rad(-45 + 0 * math.cos(sine / 10))), 0.1)
  557. motor7.C0 = clerp(motor7.C0, CFrame.new(-2.36, -1.8, -0.87) * angles(math.rad(-60 + 10 * math.cos(sine / 10)), math.rad(45 + 10 * math.cos(sine / 10)), math.rad(-45 + 0 * math.cos(sine / 10))), 0.1)
  558. motor8.C0 = clerp(motor8.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + -10 * math.cos(sine / 10)), math.rad(-45 + 10 * math.cos(sine / 10)), math.rad(45 + 0 * math.cos(sine / 10))), 0.1)
  559. motor9.C0 = clerp(motor9.C0, CFrame.new(2.36, -1.8, -0.87) * angles(math.rad(-60 + -10 * math.cos(sine / 10)), math.rad(-45 + 10 * math.cos(sine / 10)), math.rad(45 + 0 * math.cos(sine / 10))), 0.1)
  560. end
  561. end
  562. end
  563. end
  564. end
  565. end
  566. end)
Add Comment
Please, Sign In to add comment