Advertisement
lafur

Untitled

Nov 9th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.80 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --//====================================================\\--
  6. --|| CREATED BY SHACKLUSTER
  7. --\\====================================================//--
  8.  
  9.  
  10.  
  11. wait(0.2)
  12.  
  13.  
  14.  
  15. Player = game:GetService("Players").LocalPlayer
  16. PlayerGui = Player.PlayerGui
  17. Cam = workspace.CurrentCamera
  18. Backpack = Player.Backpack
  19. Character = Player.Character
  20. Humanoid = Character.Humanoid
  21. Mouse = Player:GetMouse()
  22. RootPart = Character["HumanoidRootPart"]
  23. Torso = Character["Torso"]
  24. Head = Character["Head"]
  25. RightArm = Character["Right Arm"]
  26. LeftArm = Character["Left Arm"]
  27. RightLeg = Character["Right Leg"]
  28. LeftLeg = Character["Left Leg"]
  29. RootJoint = RootPart["RootJoint"]
  30. Neck = Torso["Neck"]
  31. RightShoulder = Torso["Right Shoulder"]
  32. LeftShoulder = Torso["Left Shoulder"]
  33. RightHip = Torso["Right Hip"]
  34. LeftHip = Torso["Left Hip"]
  35.  
  36. IT = Instance.new
  37. CF = CFrame.new
  38. VT = Vector3.new
  39. RAD = math.rad
  40. C3 = Color3.new
  41. UD2 = UDim2.new
  42. BRICKC = BrickColor.new
  43. ANGLES = CFrame.Angles
  44. EULER = CFrame.fromEulerAnglesXYZ
  45. COS = math.cos
  46. ACOS = math.acos
  47. SIN = math.sin
  48. ASIN = math.asin
  49. ABS = math.abs
  50. MRANDOM = math.random
  51. FLOOR = math.floor
  52.  
  53. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  54. local NEWMESH = IT(MESH)
  55. if MESH == "SpecialMesh" then
  56. NEWMESH.MeshType = MESHTYPE
  57. if MESHID ~= "nil" and MESHID ~= "" then
  58. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  59. end
  60. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  61. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  62. end
  63. end
  64. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  65. NEWMESH.Scale = SCALE
  66. NEWMESH.Parent = PARENT
  67. return NEWMESH
  68. end
  69.  
  70. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  71. local NEWPART = IT("Part")
  72. NEWPART.formFactor = FORMFACTOR
  73. NEWPART.Reflectance = REFLECTANCE
  74. NEWPART.Transparency = TRANSPARENCY
  75. NEWPART.CanCollide = false
  76. NEWPART.Locked = true
  77. NEWPART.Anchored = true
  78. if ANCHOR == false then
  79. NEWPART.Anchored = false
  80. end
  81. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  82. NEWPART.Name = NAME
  83. NEWPART.Size = SIZE
  84. NEWPART.Position = Torso.Position
  85. NEWPART.Material = MATERIAL
  86. NEWPART:BreakJoints()
  87. NEWPART.Parent = PARENT
  88. return NEWPART
  89. end
  90.  
  91. --//=================================\\
  92. --|| CUSTOMIZATION
  93. --\\=================================//
  94.  
  95. Player_Size = 1 --Size of the player.
  96. Animation_Speed = 3
  97. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  98.  
  99. local Speed = 16
  100. local Effects2 = {}
  101.  
  102. --//=================================\\
  103. --|| END OF CUSTOMIZATION
  104. --\\=================================//
  105.  
  106. local function weldBetween(a, b)
  107. local weldd = Instance.new("ManualWeld")
  108. weldd.Part0 = a
  109. weldd.Part1 = b
  110. weldd.C0 = CFrame.new()
  111. weldd.C1 = b.CFrame:inverse() * a.CFrame
  112. weldd.Parent = a
  113. return weldd
  114. end
  115.  
  116. --//=================================\\
  117. --|| USEFUL VALUES
  118. --\\=================================//
  119.  
  120. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  121. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  122. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  123. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  124. local CHANGEDEFENSE = 0
  125. local CHANGEDAMAGE = 0
  126. local CHANGEMOVEMENT = 0
  127. local ANIM = "Idle"
  128. local ATTACK = false
  129. local EQUIPPED = false
  130. local HOLD = false
  131. local COMBO = 1
  132. local Rooted = false
  133. local SINE = 0
  134. local KEYHOLD = false
  135. local CHANGE = 2 / Animation_Speed
  136. local WALKINGANIM = false
  137. local WALK = false
  138. local VALUE1 = false
  139. local VALUE2 = false
  140. local ROBLOXIDLEANIMATION = IT("Animation")
  141. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  142. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  143. --ROBLOXIDLEANIMATION.Parent = Humanoid
  144. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  145. WEAPONGUI.Name = "Weapon GUI"
  146. local Weapon = IT("Model")
  147. Weapon.Name = "Adds"
  148. local Effects = IT("Folder", Weapon)
  149. Effects.Name = "Effects"
  150. local ANIMATOR = Humanoid.Animator
  151. local ANIMATE = Character.Animate
  152. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  153. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  154. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  155. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  156. local UNANCHOR = true
  157.  
  158. local SKILLTEXTCOLOR = C3(1,1,1)
  159.  
  160. --//=================================\\
  161. --\\=================================//
  162.  
  163.  
  164. --//=================================\\
  165. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  166. --\\=================================//
  167.  
  168. ArtificialHB = Instance.new("BindableEvent", script)
  169. ArtificialHB.Name = "ArtificialHB"
  170.  
  171. script:WaitForChild("ArtificialHB")
  172.  
  173. frame = Frame_Speed
  174. tf = 0
  175. allowframeloss = false
  176. tossremainder = false
  177. lastframe = tick()
  178. script.ArtificialHB:Fire()
  179.  
  180. game:GetService("RunService").Heartbeat:connect(function(s, p)
  181. tf = tf + s
  182. if tf >= frame then
  183. if allowframeloss then
  184. script.ArtificialHB:Fire()
  185. lastframe = tick()
  186. else
  187. for i = 1, math.floor(tf / frame) do
  188. script.ArtificialHB:Fire()
  189. end
  190. lastframe = tick()
  191. end
  192. if tossremainder then
  193. tf = 0
  194. else
  195. tf = tf - frame * math.floor(tf / frame)
  196. end
  197. end
  198. end)
  199.  
  200. --//=================================\\
  201. --\\=================================//
  202.  
  203.  
  204.  
  205.  
  206.  
  207. --//=================================\\
  208. --|| SOME FUNCTIONS
  209. --\\=================================//
  210.  
  211. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  212. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  213. end
  214.  
  215. function PositiveAngle(NUMBER)
  216. if NUMBER >= 0 then
  217. NUMBER = 0
  218. end
  219. return NUMBER
  220. end
  221.  
  222. function NegativeAngle(NUMBER)
  223. if NUMBER <= 0 then
  224. NUMBER = 0
  225. end
  226. return NUMBER
  227. end
  228.  
  229. function Swait(NUMBER)
  230. if NUMBER == 0 or NUMBER == nil then
  231. ArtificialHB.Event:wait()
  232. else
  233. for i = 1, NUMBER do
  234. ArtificialHB.Event:wait()
  235. end
  236. end
  237. end
  238.  
  239. function QuaternionFromCFrame(cf)
  240. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  241. local trace = m00 + m11 + m22
  242. if trace > 0 then
  243. local s = math.sqrt(1 + trace)
  244. local recip = 0.5 / s
  245. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  246. else
  247. local i = 0
  248. if m11 > m00 then
  249. i = 1
  250. end
  251. if m22 > (i == 0 and m00 or m11) then
  252. i = 2
  253. end
  254. if i == 0 then
  255. local s = math.sqrt(m00 - m11 - m22 + 1)
  256. local recip = 0.5 / s
  257. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  258. elseif i == 1 then
  259. local s = math.sqrt(m11 - m22 - m00 + 1)
  260. local recip = 0.5 / s
  261. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  262. elseif i == 2 then
  263. local s = math.sqrt(m22 - m00 - m11 + 1)
  264. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  265. end
  266. end
  267. end
  268.  
  269. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  270. local xs, ys, zs = x + x, y + y, z + z
  271. local wx, wy, wz = w * xs, w * ys, w * zs
  272. local xx = x * xs
  273. local xy = x * ys
  274. local xz = x * zs
  275. local yy = y * ys
  276. local yz = y * zs
  277. local zz = z * zs
  278. 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))
  279. end
  280.  
  281. function QuaternionSlerp(a, b, t)
  282. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  283. local startInterp, finishInterp;
  284. if cosTheta >= 0.0001 then
  285. if (1 - cosTheta) > 0.0001 then
  286. local theta = ACOS(cosTheta)
  287. local invSinTheta = 1 / SIN(theta)
  288. startInterp = SIN((1 - t) * theta) * invSinTheta
  289. finishInterp = SIN(t * theta) * invSinTheta
  290. else
  291. startInterp = 1 - t
  292. finishInterp = t
  293. end
  294. else
  295. if (1 + cosTheta) > 0.0001 then
  296. local theta = ACOS(-cosTheta)
  297. local invSinTheta = 1 / SIN(theta)
  298. startInterp = SIN((t - 1) * theta) * invSinTheta
  299. finishInterp = SIN(t * theta) * invSinTheta
  300. else
  301. startInterp = t - 1
  302. finishInterp = t
  303. end
  304. end
  305. 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
  306. end
  307.  
  308. function Clerp(a, b, t)
  309. local qa = {QuaternionFromCFrame(a)}
  310. local qb = {QuaternionFromCFrame(b)}
  311. local ax, ay, az = a.x, a.y, a.z
  312. local bx, by, bz = b.x, b.y, b.z
  313. local _t = 1 - t
  314. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  315. end
  316.  
  317. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  318. local frame = IT("Frame")
  319. frame.BackgroundTransparency = TRANSPARENCY
  320. frame.BorderSizePixel = BORDERSIZEPIXEL
  321. frame.Position = POSITION
  322. frame.Size = SIZE
  323. frame.BackgroundColor3 = COLOR
  324. frame.BorderColor3 = BORDERCOLOR
  325. frame.Name = NAME
  326. frame.Parent = PARENT
  327. return frame
  328. end
  329.  
  330. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  331. local label = IT("TextLabel")
  332. label.BackgroundTransparency = 1
  333. label.Size = UD2(1, 0, 1, 0)
  334. label.Position = UD2(0, 0, 0, 0)
  335. label.TextColor3 = TEXTCOLOR
  336. label.TextStrokeTransparency = STROKETRANSPARENCY
  337. label.TextTransparency = TRANSPARENCY
  338. label.FontSize = TEXTFONTSIZE
  339. label.Font = TEXTFONT
  340. label.BorderSizePixel = BORDERSIZEPIXEL
  341. label.TextScaled = false
  342. label.Text = TEXT
  343. label.Name = NAME
  344. label.Parent = PARENT
  345. return label
  346. end
  347.  
  348. function NoOutlines(PART)
  349. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  350. end
  351.  
  352.  
  353. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  354. local NEWWELD = IT(TYPE)
  355. NEWWELD.Part0 = PART0
  356. NEWWELD.Part1 = PART1
  357. NEWWELD.C0 = C0
  358. NEWWELD.C1 = C1
  359. NEWWELD.Parent = PARENT
  360. return NEWWELD
  361. end
  362.  
  363. local SOUND = IT("Sound")
  364.  
  365. function CreateSound(ID, PARENT, VOLUME, PITCH)
  366. local NEWSOUND = nil
  367. coroutine.resume(coroutine.create(function()
  368. NEWSOUND = SOUND:Clone()
  369. NEWSOUND.Parent = PARENT
  370. NEWSOUND.Volume = VOLUME
  371. NEWSOUND.Pitch = PITCH
  372. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  373. Swait()
  374. NEWSOUND:play()
  375. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  376. end))
  377. return NEWSOUND
  378. end
  379.  
  380. function CFrameFromTopBack(at, top, back)
  381. local right = top:Cross(back)
  382. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  383. end
  384.  
  385. function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
  386. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  387. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
  388. wave.CFrame = CFRAME
  389. coroutine.resume(coroutine.create(function(PART)
  390. for i = 1, WAIT do
  391. Swait()
  392. mesh.Scale = mesh.Scale + GROW
  393. if DOESROT == true then
  394. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  395. end
  396. wave.Transparency = wave.Transparency + (0.5/WAIT)
  397. if wave.Transparency > 0.99 then
  398. wave:remove()
  399. end
  400. end
  401. end))
  402. end
  403.  
  404. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  405. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  406. local mesh = nil
  407. if KIND == "Base" then
  408. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  409. elseif KIND == "Thin" then
  410. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  411. elseif KIND == "Round" then
  412. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  413. end
  414. wave.CFrame = CFRAME
  415. coroutine.resume(coroutine.create(function(PART)
  416. for i = 1, WAIT do
  417. Swait()
  418. mesh.Scale = mesh.Scale + GROW/10
  419. wave.Transparency = wave.Transparency + (0.5/WAIT)
  420. if wave.Transparency > 0.99 then
  421. wave:remove()
  422. end
  423. end
  424. end))
  425. end
  426.  
  427. function MakeForm(PART,TYPE)
  428. if TYPE == "Cyl" then
  429. local MSH = IT("CylinderMesh",PART)
  430. elseif TYPE == "Ball" then
  431. local MSH = IT("SpecialMesh",PART)
  432. MSH.MeshType = "Sphere"
  433. elseif TYPE == "Wedge" then
  434. local MSH = IT("SpecialMesh",PART)
  435. MSH.MeshType = "Wedge"
  436. end
  437. end
  438.  
  439. function CheckTableForString(Table, String)
  440. for i, v in pairs(Table) do
  441. if string.find(string.lower(String), string.lower(v)) then
  442. return true
  443. end
  444. end
  445. return false
  446. end
  447.  
  448. function CheckIntangible(Hit)
  449. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  450. if Hit and Hit.Parent then
  451. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  452. return true
  453. end
  454. end
  455. return false
  456. end
  457.  
  458. Debris = game:GetService("Debris")
  459.  
  460. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  461. local Direction = CFrame.new(StartPos, Vec).lookVector
  462. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  463. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  464. if RayHit and CheckIntangible(RayHit) then
  465. if DelayIfHit then
  466. wait()
  467. end
  468. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  469. end
  470. return RayHit, RayPos, RayNormal
  471. end
  472.  
  473. function turnto(position)
  474. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  475. end
  476.  
  477. --//=================================\\
  478. --|| WEAPON CREATION
  479. --\\=================================//
  480.  
  481. local WHEEL1 = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Pearl", "Wheelie", VT(0.5,0,0.5),false)
  482. MakeForm(WHEEL1,"Cyl")
  483. WHEEL1.CFrame = LeftLeg.CFrame*CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(90))
  484. weldBetween(LeftLeg,WHEEL1)
  485.  
  486. local WHEEL1 = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Pearl", "Wheelie", VT(0.5,0,0.5),false)
  487. MakeForm(WHEEL1,"Cyl")
  488. WHEEL1.CFrame = RightLeg.CFrame*CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(90))
  489. weldBetween(RightLeg,WHEEL1)
  490.  
  491. local WHEEL1 = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Wheelie", VT(0.15,0.2,0.15),false)
  492. MakeForm(WHEEL1,"Cyl")
  493. WHEEL1.CFrame = LeftLeg.CFrame*CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(90))
  494. weldBetween(LeftLeg,WHEEL1)
  495.  
  496. local WHEEL1 = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Wheelie", VT(0.15,0.2,0.15),false)
  497. MakeForm(WHEEL1,"Cyl")
  498. WHEEL1.CFrame = RightLeg.CFrame*CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(90))
  499. weldBetween(RightLeg,WHEEL1)
  500.  
  501. for _, c in pairs(Weapon:GetChildren()) do
  502. if c.ClassName == "Part" then
  503. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  504. end
  505. end
  506.  
  507. Weapon.Parent = Character
  508.  
  509. Humanoid.Died:connect(function()
  510. ATTACK = true
  511. end)
  512.  
  513. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.13, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  514. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.60, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  515. local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  516.  
  517. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Kicks", SKILLTEXTCOLOR, 7, "SciFi", 0, 2, 1, "Text 1")
  518. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Strafe", SKILLTEXTCOLOR, 7, "SciFi", 0, 2, 1, "Text 2")
  519. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Blade formation", SKILLTEXTCOLOR, 7, "SciFi", 0, 2, 1, "Text 3")
  520.  
  521. --//=================================\\
  522. --|| DAMAGE FUNCTIONS
  523. --\\=================================//
  524.  
  525. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  526. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  527. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  528. local BODYGYRO = IT("BodyGyro", STATPART)
  529. local BODYPOSITION = IT("BodyPosition", STATPART)
  530. BODYPOSITION.P = 2000
  531. BODYPOSITION.D = 100
  532. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  533. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  534. game:GetService("Debris"):AddItem(STATPART ,5)
  535. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  536. BILLBOARDGUI.Adornee = STATPART
  537. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  538. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  539. BILLBOARDGUI.AlwaysOnTop = false
  540. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  541. TEXTLABEL.BackgroundTransparency = 1
  542. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  543. TEXTLABEL.Text = TEXT
  544. TEXTLABEL.Font = "SciFi"
  545. TEXTLABEL.FontSize="Size42"
  546. TEXTLABEL.TextColor3 = COLOR
  547. TEXTLABEL.TextStrokeTransparency = 1
  548. TEXTLABEL.TextScaled = true
  549. TEXTLABEL.TextWrapped = true
  550. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  551. if LABELTYPE == "Normal" then
  552. for i = 1, 30 do
  553. Swait()
  554. STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
  555. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  556. end
  557. elseif LABELTYPE == "Debuff" then
  558. for i = 1, 30 do
  559. Swait()
  560. STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
  561. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  562. end
  563. elseif LABELTYPE == "Shock" then
  564. local ORIGIN = STATPART.Position
  565. for i = 1, 30 do
  566. Swait()
  567. STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
  568. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
  569. end
  570. end
  571. THEPART.Parent = nil
  572. end),STATPART, BODYPOSITION, TEXTLABEL)
  573. end
  574.  
  575. --//=================================\\
  576. --|| DAMAGING
  577. --\\=================================//
  578.  
  579. function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier)
  580. local defence = Instance.new("BoolValue",Humanoid.Parent)
  581. defence.Name = ("HitBy"..Player.Name)
  582. game:GetService("Debris"):AddItem(defence, 0.001)
  583. if Humanoid.Health ~= 0 then
  584. local CritChance = MRANDOM(1,100)
  585. if CritChance < CritRate + 1 then
  586. Damage = Damage*CritMultiplier
  587. end
  588. if Damage > Humanoid.Health then
  589. Damage = math.ceil(Humanoid.Health)
  590. if Damage == 0 then
  591. Damage = 0.1
  592. end
  593. end
  594. Humanoid.Health = Humanoid.Health - Damage
  595. if Humanoid.Parent:FindFirstChild("Head") then
  596. if CritChance < CritRate + 1 then
  597. StatLabel("Normal", Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
  598. else
  599. StatLabel("Normal", Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, C3(0, 0, 0))
  600. end
  601. end
  602. end
  603. end
  604.  
  605. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping)
  606. local dmg = math.random(min,max)
  607. for i,v in ipairs(workspace:GetChildren()) do
  608. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  609. local body = v:GetChildren()
  610. for part = 1, #body do
  611. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  612. if(body[part].Position - position).Magnitude < radius then
  613. if v.ClassName == "Model" then
  614. if v:FindFirstChildOfClass("Humanoid") then
  615. if CanBeDodgedByJumping == true then
  616. if body[part].Position.Y < position.Y+5 then
  617. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  618. end
  619. else
  620. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  621. end
  622. local bv = Instance.new("BodyVelocity")
  623. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  624. bv.velocity = RootPart.CFrame.lookVector*maxstrength
  625. bv.Parent = body[part]
  626. Debris:AddItem(bv,0.2)
  627. end
  628. end
  629. end
  630. end
  631. end
  632. end
  633. if v:FindFirstChild("HitBy"..Player.Name) then
  634. v:FindFirstChild("HitBy"..Player.Name):remove()
  635. end
  636. end
  637. end
  638.  
  639. --//=================================\\
  640. --|| ATTACK FUNCTIONS AND STUFF
  641. --\\=================================//
  642.  
  643. function Transparency(TRANS)
  644. for _, c in pairs(Character:GetChildren()) do
  645. if c.ClassName == "Part" and c ~= RootPart then
  646. c.Transparency = TRANS
  647. if c:FindFirstChildOfClass("Decal") then
  648. c:FindFirstChildOfClass("Decal").Transparency = TRANS
  649. end
  650. elseif c.ClassName == "Accessory" then
  651. c.Handle.Transparency = TRANS
  652. elseif c.ClassName == "Model" then
  653. for _, q in pairs(c:GetChildren()) do
  654. if q.ClassName == "Part" then
  655. q.Transparency = TRANS
  656. if q:FindFirstChildOfClass("Decal") then
  657. q:FindFirstChildOfClass("Decal").Transparency = TRANS
  658. end
  659. end
  660. end
  661. end
  662. end
  663. end
  664.  
  665. function Kicks(STRAFE)
  666. ATTACK = true
  667. Rooted = false
  668. if COMBO == 1 then
  669. COMBO = 2
  670. CreateSound("199150686", Torso, 1, MRANDOM(11,13)/10)
  671. if STRAFE == true then
  672. AoEDamage(Torso.CFrame*CF(0,-1,-2).p,5,15,17,0,2,2,false)
  673. else
  674. AoEDamage(Torso.CFrame*CF(0,-1,-2).p,5,5,7,0,2,2,false)
  675. end
  676. for i=0, 0.5, 0.1 / Animation_Speed do
  677. Swait()
  678. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-25), RAD(0), RAD(45)), 2 / Animation_Speed)
  679. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-45)), 2 / Animation_Speed)
  680. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  681. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  682. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(45), RAD(135), RAD(0)) * ANGLES(RAD(-38), RAD(0), RAD(0)), 2 / Animation_Speed)
  683. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 2 / Animation_Speed)
  684. end
  685. elseif COMBO == 2 then
  686. COMBO = 1
  687. CreateSound("199150686", Torso, 1, MRANDOM(11,13)/10)
  688. if STRAFE == true then
  689. AoEDamage(Torso.CFrame*CF(0,-1,-2).p,5,15,17,0,2,2,false)
  690. else
  691. AoEDamage(Torso.CFrame*CF(0,-1,-2).p,5,5,7,0,2,2,false)
  692. end
  693. for i=0, 0.5, 0.1 / Animation_Speed do
  694. Swait()
  695. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-25), RAD(0), RAD(-45)), 2 / Animation_Speed)
  696. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(45)), 2 / Animation_Speed)
  697. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  698. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  699. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 2 / Animation_Speed)
  700. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(45), RAD(-135), RAD(0)) * ANGLES(RAD(-38), RAD(0), RAD(0)), 2 / Animation_Speed)
  701. end
  702. end
  703. ATTACK = false
  704. Rooted = false
  705. end
  706.  
  707. function Strafe()
  708. ATTACK = true
  709. Rooted = true
  710. for i=0, 1, 0.1 / Animation_Speed do
  711. Swait()
  712. RootPart.CFrame = RootPart.CFrame*CF(0,0,-1)
  713. local HIT = Raycast(RootPart.Position, RootPart.CFrame.lookVector, 2, Character)
  714. if HIT ~= nil then
  715. break
  716. end
  717. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.5 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed)
  718. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  719. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  720. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  721. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(-12), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  722. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(-12), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  723. end
  724. Kicks(true)
  725. ATTACK = false
  726. Rooted = false
  727. end
  728.  
  729. function BladeFormation()
  730. ATTACK = true
  731. Rooted = true
  732. for i=0, 1, 0.1 / Animation_Speed do
  733. Swait()
  734. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.5 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(45), RAD(0), RAD(0)), 2 / Animation_Speed)
  735. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 2 / Animation_Speed)
  736. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  737. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  738. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(-12), RAD(45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 2 / Animation_Speed)
  739. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(-12), RAD(-45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 2 / Animation_Speed)
  740. end
  741. Transparency(1)
  742. for i = 1, 25 do
  743. Swait()
  744. CreateSound("199150686", Torso, 1, MRANDOM(11,13)/10)
  745. RootPart.CFrame = RootPart.CFrame * CF(0,0,-3)
  746. AoEDamage(Torso.Position,15,2,4,0,2,2,false)
  747. Slice("Round",1,15,RootPart.CFrame * CF(MRANDOM(-10,10),MRANDOM(-10,10),MRANDOM(-10,10)) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),SKILLTEXTCOLOR,VT(-0.2,0,-0.2))
  748. Slice("Round",2,15,RootPart.CFrame * CF(MRANDOM(-10,10),MRANDOM(-10,10),MRANDOM(-10,10)) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),SKILLTEXTCOLOR,VT(-0.2,0,-0.2))
  749. end
  750. Transparency(0)
  751. ATTACK = false
  752. Rooted = false
  753. end
  754.  
  755. --//=================================\\
  756. --|| ASSIGN THINGS TO KEYS
  757. --\\=================================//
  758.  
  759. function MouseDown(Mouse)
  760. if ATTACK == false then
  761. end
  762. end
  763.  
  764. function MouseUp(Mouse)
  765. HOLD = false
  766. end
  767.  
  768. function KeyDown(Key)
  769. KEYHOLD = true
  770. if Key == "z" and ATTACK == false then
  771. Kicks()
  772. end
  773.  
  774. if Key == "b" and ATTACK == false then
  775. Strafe()
  776. end
  777.  
  778. if Key == "c" and ATTACK == false then
  779. BladeFormation()
  780. end
  781. end
  782.  
  783. function KeyUp(Key)
  784. KEYHOLD = false
  785. end
  786.  
  787. Mouse.Button1Down:connect(function(NEWKEY)
  788. MouseDown(NEWKEY)
  789. end)
  790. Mouse.Button1Up:connect(function(NEWKEY)
  791. MouseUp(NEWKEY)
  792. end)
  793. Mouse.KeyDown:connect(function(NEWKEY)
  794. KeyDown(NEWKEY)
  795. end)
  796. Mouse.KeyUp:connect(function(NEWKEY)
  797. KeyUp(NEWKEY)
  798. end)
  799.  
  800. --//=================================\\
  801. --\\=================================//
  802.  
  803.  
  804. function unanchor()
  805. if UNANCHOR == true then
  806. g = Character:GetChildren()
  807. for i = 1, #g do
  808. if g[i].ClassName == "Part" then
  809. g[i].Anchored = false
  810. end
  811. end
  812. end
  813. end
  814.  
  815.  
  816. --//=================================\\
  817. --|| WRAP THE WHOLE SCRIPT UP
  818. --\\=================================//
  819.  
  820. Humanoid.Changed:connect(function(Jump)
  821. if Jump == "Jump" and (Disable_Jump == true) then
  822. Humanoid.Jump = false
  823. end
  824. end)
  825.  
  826. Humanoid.HipHeight = 0.3
  827.  
  828. while true do
  829. Swait()
  830. ANIMATE.Parent = nil
  831. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  832. IDLEANIMATION:Play()
  833. SINE = SINE + CHANGE
  834. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  835. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  836. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  837. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  838. local WALKSPEEDVALUE = 6
  839. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  840. ANIM = "Jump"
  841. if ATTACK == false then
  842. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  843. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 * Player_Size, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  844. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  845. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  846. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  847. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  848. end
  849. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  850. ANIM = "Fall"
  851. if ATTACK == false then
  852. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  853. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  854. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  855. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  856. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  857. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  858. end
  859. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  860. ANIM = "Idle"
  861. if ATTACK == false then
  862. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  863. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  864. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  865. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  866. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(30 * COS(SINE / WALKSPEEDVALUE)), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  867. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  868. end
  869. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  870. if WALK == false then
  871. coroutine.resume(coroutine.create(function()
  872. WALK = true
  873. if ATTACK == false then
  874. --CreateSound("199150686", Torso, 1, MRANDOM(15,17)/10)
  875. for i=0, 1, 0.1 / Animation_Speed do
  876. Swait()
  877. if ATTACK == true or ANIM ~= "Walk" then
  878. break
  879. end
  880. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  881. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  882. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  883. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  884. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  885. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  886. end
  887. if ATTACK == false and ANIM == "Walk" then
  888. --CreateSound("199150686", Torso, 1, MRANDOM(15,17)/10)
  889. for i=0, 1, 0.1 / Animation_Speed do
  890. Swait()
  891. if ATTACK == true or ANIM ~= "Walk" then
  892. break
  893. end
  894. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  895. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  896. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  897. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  898. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  899. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  900. end
  901. end
  902. end
  903. WALK = false
  904. end))
  905. end
  906. ANIM = "Walk"
  907. end
  908. if ANIM == "Walk" then
  909. if Speed < 75 then
  910. Speed = Speed + 0.2
  911. end
  912. else
  913. Speed = 14
  914. end
  915. unanchor()
  916. Humanoid.MaxHealth = "inf"
  917. Humanoid.Health = "inf"
  918. if Rooted == false then
  919. Disable_Jump = false
  920. Humanoid.WalkSpeed = Speed
  921. elseif Rooted == true then
  922. Disable_Jump = true
  923. Humanoid.WalkSpeed = 0
  924. end
  925. end
  926.  
  927. --//=================================\\
  928. --\\=================================//
  929.  
  930.  
  931.  
  932.  
  933.  
  934. --//====================================================\\--
  935. --|| END OF SCRIPT
  936. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement