Advertisement
Im_Meme

Wheelies

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