Advertisement
Dark_EccentricYT

Untitled

Oct 11th, 2018
1,370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.60 KB | None | 0 0
  1. ------------------------------------------------------------------------ useful functions
  2. function r(n) return (math.random()-.5)*2*n end
  3. function c(func,args) coroutine.resume(coroutine.create(func),unpack(args or {})) end
  4. function Part(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat)
  5. local surfaces = {"Front","Back","Left","Right","Top","Bottom"}
  6. local p = Instance.new("Part",Parent)p.Name = Name
  7. p.FormFactor = "Custom"p.Size = Size
  8. p.Anchored = Anch p.CFrame = CFrame
  9. p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
  10. p.CanCollide = Can;p.Material = Mat
  11. p:BreakJoints();p.Locked = true
  12. for i=1,#surfaces do p[surfaces[i].."Surface"] = 10 end
  13. return p
  14. end
  15. function WedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat)
  16. local surfaces = {"Front","Back","Left","Right","Top","Bottom"}
  17. local p = Instance.new("WedgePart",Parent)p.Name = Name
  18. p.FormFactor = "Custom"p.Size = Size
  19. p.Anchored = Anch p.CFrame = CFrame
  20. p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
  21. p.CanCollide = Can;p.Material = Mat
  22. p:BreakJoints();p.Locked = true
  23. for i=1,#surfaces do p[surfaces[i].."Surface"] = 10 end
  24. return p
  25. end
  26. function Mesh(Parent,Type,Scale,ID,TID)
  27. local m = Instance.new("SpecialMesh",Parent)m.MeshType = Type
  28. m.Scale = Scale or Vector3.new(1,1,1)
  29. if ID then m.MeshId = ID end if TID then m.TextureId = TID end
  30. return m
  31. end
  32. function Weld(p1,p2,c0,c1)
  33. local w = Instance.new("Weld",p1)w.Part0 = p1;w.Part1 = p2
  34. w.C0,w.C1 = c0 or CFrame.new(),c1 or CFrame.new()
  35. return w
  36. end
  37. function rayCast(pos,dir,ign)
  38. ign = ign or {char}
  39. return workspace:FindPartOnRayWithIgnoreList(Ray.new(pos,dir),ign)
  40. end
  41. ------------------------------------------------------------------------
  42. Tween = {}
  43. function slerp(a,b,c)return (1-c)*a+(c*b)end
  44. function cslerp(start,destination,increment)
  45. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  46. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  47. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  48. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  49. end
  50. function TweenWeld(weld,type,start,finish,speed,sync)
  51. if Tween[weld] and Tween[weld][1] == true then return end
  52. Tween[weld] = {weld,true}
  53. local function T()
  54. for i=1,speed do
  55. local s = i/speed
  56. weld[type] = cslerp(start,finish,s)
  57. game:service("RunService").Stepped:wait()
  58. end
  59. Tween[weld] = {weld,false}
  60. end
  61. if sync then coroutine.wrap(T)() else T() end
  62. end
  63. ------------------------------------------------------------------------ variables
  64. player = game:service("Players").LocalPlayer
  65. local char
  66. repeat wait() char = player.Character until char
  67. root = char:WaitForChild("HumanoidRootPart")
  68. torso = char:WaitForChild("Torso")
  69. humanoid = char:WaitForChild("Humanoid")
  70. head = char:WaitForChild("Head")
  71. bodycolours = char:WaitForChild("Body Colors")
  72. mouse = player:GetMouse()
  73. step = game:service("RunService").RenderStepped
  74. camera = workspace.CurrentCamera
  75. asset = "http://www.roblox.com/asset/?id="
  76. meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362}
  77. sounds = {["explode"] = 130792180;["spin"] = 147722227;["patrick"] = 135290668;["hit"] = 146163493}
  78. torsomesh = "rbxasset://fonts/torso.mesh"
  79. Attacking = false
  80. Trailing = true
  81. target = nil
  82. tweenLegs = false
  83. Events = setmetatable({},{ -- kinda useless in this script but eh
  84. __nexindex = function(self,Index,Value)
  85. local T = {}
  86. T.Name = Index
  87. T.Event = Value
  88. table.insert(self,T)
  89. end;
  90. __call = function(self,Index)
  91. for i,v in pairs(self) do
  92. if v.Name == Index then
  93. return true,v.Event
  94. end
  95. end
  96. return false,nil
  97. end;
  98. })
  99. c0 = {
  100. ls = CFrame.new(-1,0.5,0)*CFrame.new(.5,0,0)*CFrame.Angles(math.pi/3,0,math.pi/4),
  101. rs = CFrame.new(1,0.5,0)*CFrame.new(-.3,0,0)*CFrame.Angles(math.pi/3,0,-math.pi/10),
  102. lh = CFrame.new(-1,-1,0),
  103. rh = CFrame.new(1,-1,0),
  104. nk = CFrame.new(0,1,0)*CFrame.Angles(0,math.pi/9,0),
  105. tw = CFrame.new(0,0,0)*CFrame.Angles(0,-math.pi/9,0),
  106. }
  107. c0NA = {
  108. ls = CFrame.new(-1,0.5,0),
  109. rs = CFrame.new(1,0.5,0),
  110. lh = CFrame.new(-1,-1,0),
  111. rh = CFrame.new(1,-1,0),
  112. nk = CFrame.new(0,1,0),
  113. tw = CFrame.new(0,0,0),
  114. }
  115. c1 = {
  116. ls = CFrame.new(0.5,0.5,0),
  117. rs = CFrame.new(-0.5,0.5,0),
  118. lh = CFrame.new(-.5,1,0),
  119. rh = CFrame.new(.5,1,0),
  120. nk = CFrame.new(0,-.5,0),
  121. tw = CFrame.new(0,0,0),
  122. }
  123. slashset = {
  124. last = tick();
  125. clicked = false;
  126. }
  127. combo1set = {
  128. last = tick();
  129. clicked = false;
  130. }
  131. Spin,Rad = false,0
  132. Mode = "Slash"
  133. bg = Instance.new("BodyGyro",root)
  134. bg.maxTorque = Vector3.new(1,1,1)*10^6
  135. bg.P = 10^4
  136. rs = Weld(torso,char:WaitForChild("Right Arm"),c0.rs,c1.rs)
  137. ls = Weld(torso,char:WaitForChild("Left Arm"),c0.ls,c1.ls)
  138. rh = Weld(torso,char:WaitForChild("Right Leg"),c0.rh,c1.rh)
  139. lh = Weld(torso,char:WaitForChild("Left Leg"),c0.lh,c1.lh)
  140. tw = Weld(root,torso,c0.tw)
  141. hw = Weld(torso,head,c0.nk,c1.nk)
  142. colour = {"Black","Tr. Yellow","Bright yellow"}
  143. --{"Black","Medium red","Bright red"}
  144. --{"Black","Pastel blue-green","Teal"}
  145. --{"Black","Tr. Red","Red flip/flop"}
  146. --{"Black","Tr. Yellow","Bright yellow"}
  147. --{"Black","Med. yellowish orange","Bright orange"}
  148. local model,ohw
  149. ------------------------------------------------------------------------ effects & functions
  150. function quickSound(id,v,p)
  151. local s = Instance.new("Sound",workspace)
  152. s.SoundId = id
  153. s.PlayOnRemove = true
  154. s.Volume = v or 1
  155. s.Pitch = p or 1
  156. delay(0.025,function()s:remove()end)
  157. end
  158. function checkDmgArea(origin,dmg,d)
  159. for i,v in pairs(workspace:children())do
  160. if v~=char and v:FindFirstChild("Torso") then
  161. local h;
  162. for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
  163. local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
  164. if dist < d and h~=nil then
  165. h.Health = h.Health - dmg
  166. end
  167. end
  168. end
  169. end
  170. function findClosestPlayer(origin,d)
  171. local bdist,plr = d,nil
  172. for i,v in pairs(workspace:children())do
  173. if v~=char and v:FindFirstChild("Torso") then
  174. local h;
  175. for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
  176. local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
  177. if dist < bdist and h~=nil and h.Health~=0 then
  178. bdist,plr = dist,v
  179. end
  180. end
  181. end
  182. return plr,bdist
  183. end
  184. function drawLine(mag,one,two)
  185. local t = Part("",char,Vector3.new(.5,mag,.5),CFrame.new(one,two)*CFrame.new(0,0,-mag/2)*CFrame.Angles(math.pi/2,0,0),"White",0,true,false,"Plastic")
  186. c(function(p,m)
  187. for i=1,0,-.05 do
  188. m.Scale = Vector3.new(i,1,i)
  189. wait(1/30)
  190. end
  191. p:Destroy()
  192. end,{t,Instance.new("CylinderMesh",t)})
  193. end
  194. function Trail(part)
  195. Trailing = true
  196. local lastPos = part.CFrame.p
  197. local tik = tick()
  198. local tim = .025
  199. local loop;
  200. loop = game:service("RunService").RenderStepped:connect(function()
  201. if (tick()-tik)>tim and Trailing then
  202. local dist = (lastPos-part.CFrame.p).magnitude
  203. drawLine(dist,lastPos,part.CFrame.p)
  204. lastPos = part.CFrame.p
  205. tik = tick()
  206. elseif not Trailing then
  207. loop:disconnect()
  208. end
  209. end)
  210. end
  211. ------------------------------------------------------------------------ build the weapon
  212. pcall(function()char:FindFirstChild("Weapon"):Destroy()end)
  213. model = Instance.new("Model",char)
  214. model.Name = "Weapon"
  215. handle = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[1],0,false,false,"Plastic")
  216. handlem = Instance.new("CylinderMesh",handle)
  217. handlem.Scale = Vector3.new(.8,1,.8)
  218. handlew = Weld(char:FindFirstChild("Right Arm"),handle,CFrame.new(-.4,-1.1,0)*CFrame.Angles(-math.pi/2,math.pi/2,0))
  219. p1 = Part("",model,Vector3.new(0.25,0.25,0.25),torso.CFrame,colour[2],0,false,false,"Plastic")
  220. p1m = Instance.new("CylinderMesh",p1)
  221. p1w = Weld(handle,p1,CFrame.new(0,-.5,0))
  222. p2 = Part("",model,Vector3.new(0.3,0,0.3),torso.CFrame,colour[3],0,false,false,"Plastic")
  223. p2m = Instance.new("CylinderMesh",p2)
  224. p2w = Weld(p1,p2,CFrame.new(0,-.125,0))
  225. p3 = Part("",model,Vector3.new(0.25,0.25,0.25),torso.CFrame,colour[2],0,false,false,"Plastic")
  226. p3m = Instance.new("CylinderMesh",p3)
  227. p3w = Weld(handle,p3,CFrame.new(0,.5,0))
  228. p4 = Part("",model,Vector3.new(0.3,0,0.3),torso.CFrame,colour[3],0,false,false,"Plastic")
  229. p4m = Instance.new("CylinderMesh",p4)
  230. p4w = Weld(p3,p4,CFrame.new(0,.125,0))
  231. div = Part("",model,Vector3.new(2,0,.3),torso.CFrame,colour[1],0,false,false,"Plastic")
  232. divw = Weld(handle,div,CFrame.new(0,.75,0))
  233. p5 = Part("",model,Vector3.new(0,0,0),torso.CFrame,colour[1],0,false,false,"Plastic")
  234. p5m = Mesh(p5,"FileMesh",Vector3.new(.15,1,.15),asset..meshes["spike"])
  235. p5w = Weld(div,p5,CFrame.new(-1,.3,0)*CFrame.Angles(0,0,math.pi/6))
  236. p6 = Part("",model,Vector3.new(0,0,0),torso.CFrame,colour[1],0,false,false,"Plastic")
  237. p6m = Mesh(p6,"FileMesh",Vector3.new(.15,1,.15),asset..meshes["spike"])
  238. p6w = Weld(div,p6,CFrame.new(1,.3,0)*CFrame.Angles(0,0,-math.pi/6))
  239. blade = Part("",model,Vector3.new(1.5,4,0),torso.CFrame,colour[2],0.5,false,false,"SmoothPlastic")
  240. bladem = Mesh(blade,"Brick",Vector3.new(1.025,1,1))
  241. bladew = Weld(div,blade,CFrame.new(0,2,0))
  242. for i=1,9 do
  243. local angle = math.pi*2/9*i
  244. local p = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  245. local pm = Mesh(p,"FileMesh",Vector3.new(.075,.1475,.125),torsomesh)
  246. local pw = Weld(blade,p,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,0,0)*CFrame.Angles(angle,0,0)*CFrame.new(0,0,.325))
  247. end
  248. for i=1,6 do
  249. local angle = math.pi*2/6*i
  250. local p = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  251. local pm = Mesh(p,"FileMesh",Vector3.new(.075,.1475,.125),torsomesh)
  252. local pw = Weld(blade,p,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,1,-.5)*CFrame.Angles(angle,0,0)*CFrame.new(0,0,.19))
  253. local p2 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  254. local p2m = Mesh(p2,"FileMesh",Vector3.new(.075,.1475,.125),torsomesh)
  255. local p2w = Weld(blade,p2,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,1,.5)*CFrame.Angles(angle,0,0)*CFrame.new(0,0,.19))
  256. local p3 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  257. local p3m = Mesh(p3,"FileMesh",Vector3.new(.075,.1475,.125),torsomesh)
  258. local p3w = Weld(blade,p3,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-1,0)*CFrame.Angles(angle,0,0)*CFrame.new(0,0,.19))
  259. end
  260. local tip
  261. local y = 2.15
  262. for i=1.5,0,-.5 do
  263. local p = Part("",model,Vector3.new(0,0,i),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  264. local pm = Mesh(p,"Brick")
  265. local pw = Weld(blade,p,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,y,0))
  266. y = y + .25
  267. if i==0 then tip = p end
  268. end
  269. bp = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  270. bpm = Mesh(bp,"FileMesh",Vector3.new(.075,.215,.125),torsomesh)
  271. bpw = Weld(blade,bp,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.4,-.25)*CFrame.Angles(math.pi/6,0,0))
  272. bp2 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  273. bp2m = Mesh(bp2,"FileMesh",Vector3.new(.075,.215,.125),torsomesh)
  274. bp2w = Weld(blade,bp2,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.7,-.25)*CFrame.Angles(-math.pi/6,0,0))
  275. bp3 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  276. bp3m = Mesh(bp3,"FileMesh",Vector3.new(.075,.215,.125),torsomesh)
  277. bp3w = Weld(blade,bp3,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.4,.25)*CFrame.Angles(-math.pi/6,0,0))
  278. bp4 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  279. bp4m = Mesh(bp4,"FileMesh",Vector3.new(.075,.215,.125),torsomesh)
  280. bp4w = Weld(blade,bp4,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.7,.25)*CFrame.Angles(math.pi/6,0,0))
  281. bp5 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  282. bp5m = Mesh(bp5,"FileMesh",Vector3.new(.075,1.4,.125),torsomesh)
  283. bp5w = Weld(blade,bp5,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.55,.5))
  284. bp6 = Part("",model,Vector3.new(0,1,0),torso.CFrame,colour[3],0,false,false,"SmoothPlastic")
  285. bp6m = Mesh(bp6,"FileMesh",Vector3.new(.075,1.4,.125),torsomesh)
  286. bp6w = Weld(blade,bp6,CFrame.Angles(0,math.pi/2,0)*CFrame.new(0,-.55,-.5))
  287. ohw,ohwNA = handlew.C0,CFrame.new(-.4,-1.1,0)
  288. ------------------------------------------------------------------------ attacks
  289. function returnToOriginal(speed,legbool)
  290. TweenWeld(rs,"C0",rs.C0,c0.rs,speed,true)
  291. TweenWeld(ls,"C0",ls.C0,c0.ls,speed,true)
  292. if legbool then
  293. TweenWeld(rh,"C0",rh.C0,c0.rh,speed,true)
  294. TweenWeld(lh,"C0",lh.C0,c0.lh,speed,true)
  295. end
  296. TweenWeld(tw,"C0",tw.C0,c0.tw,speed,true)
  297. TweenWeld(hw,"C0",hw.C0,c0.nk,speed,true)
  298. TweenWeld(handlew,"C0",handlew.C0,ohw,speed)
  299. end
  300. function Slash()
  301. Trail(tip)
  302. c(function()
  303. while wait()and Attacking do
  304. checkDmgArea(blade.CFrame,5,4)
  305. end
  306. end)
  307. TweenWeld(rs,"C0",rs.C0,c0NA.rs*CFrame.new(.25,0,-.5)*CFrame.Angles(math.pi/1.75,0,math.pi/2),5,true)
  308. TweenWeld(ls,"C0",ls.C0,c0NA.ls*CFrame.new(0,0,-.5)*CFrame.Angles(math.pi/3,0,-math.pi/4),5,true)
  309. TweenWeld(tw,"C0",tw.C0,c0NA.tw*CFrame.Angles(0,math.pi/2,0),5,true)
  310. TweenWeld(hw,"C0",hw.C0,c0NA.nk*CFrame.Angles(0,-math.pi/2,0),5,true)
  311. TweenWeld(handlew,"C0",handlew.C0,ohwNA*CFrame.Angles(0,0,math.pi),5)
  312. Trailing = false
  313. end
  314. function PrepareSlash()
  315. Attacking = true
  316. slashset.clicked = false
  317. TweenWeld(rs,"C0",rs.C0,c0NA.rs*CFrame.new(0,0,-.5)*CFrame.Angles(math.pi/1.75,0,math.pi/4),5,true)
  318. TweenWeld(ls,"C0",ls.C0,c0NA.ls*CFrame.new(0,0,-.5)*CFrame.Angles(math.pi/3,0,-math.pi/4),5,true)
  319. TweenWeld(tw,"C0",tw.C0,c0NA.tw*CFrame.Angles(0,-math.pi/3,0),5,true)
  320. TweenWeld(hw,"C0",hw.C0,c0NA.nk*CFrame.Angles(0,math.pi/4,0),5,true)
  321. TweenWeld(handlew,"C0",handlew.C0,ohw*CFrame.Angles(0,-math.pi/2,math.pi/2),5,true)
  322. slashset.last = tick()
  323. repeat wait()until (tick()-slashset.last)>4 or slashset.clicked
  324. if slashset.clicked then
  325. slashset.clicked = false
  326. Slash()
  327. end
  328. returnToOriginal(15)
  329. Attacking = false
  330. end
  331. function KS(victim)
  332. Attacking = true
  333. humanoid.WalkSpeed = 0
  334. tweenLegs = true
  335. local t = victim:FindFirstChild("Torso")
  336. target = t
  337. local h
  338. for _,v in pairs(victim:children())do if v:IsA("Humanoid") then h = v end end
  339. TweenWeld(rs,"C0",rs.C0,c0NA.rs*CFrame.new(.5,-.5,0)*CFrame.Angles(0,0,math.pi/2),5,true)
  340. TweenWeld(ls,"C0",ls.C0,c0NA.ls*CFrame.new(-.5,-.5,0)*CFrame.Angles(0,0,-math.pi/2),5)
  341. TweenWeld(rs,"C0",rs.C0,rs.C0,5,true)
  342. TweenWeld(ls,"C0",ls.C0,ls.C0,5,true)
  343. TweenWeld(rh,"C0",rh.C0,c0NA.rh*CFrame.new(0,.5,0)*CFrame.Angles(math.pi/5,0,0),5,true)
  344. TweenWeld(lh,"C0",lh.C0,c0NA.lh*CFrame.new(0,.5,0)*CFrame.Angles(-math.pi/5,0,0),5,true)
  345. TweenWeld(tw,"C0",tw.C0,c0.tw*CFrame.Angles(0,0,math.pi/2),5,true)
  346. TweenWeld(hw,"C0",hw.C0,c0.nk,5,true)
  347. TweenWeld(handlew,"C0",handlew.C0,ohwNA*CFrame.Angles(0,0,math.pi),5,true)
  348. c(function()
  349. repeat wait()
  350. h.WalkSpeed = 0
  351. h.PlatformStand = true
  352. until not Attacking
  353. end)
  354. Spin = true
  355. Rad = 0
  356. quickSound(asset..sounds["hit"])
  357. repeat wait()
  358. until Rad >= 360
  359. Spin = false
  360. returnToOriginal(10,true)
  361. target = nil
  362. tweenLegs = false
  363. humanoid.WalkSpeed = 16
  364. Attacking = false
  365. end
  366. ------------------------------------------------------------------------
  367.  
  368. ------------------------------------------------------------------------
  369. Events["ButtonDown"] = mouse.Button1Down:connect(function()
  370. if not Attacking then
  371. PrepareSlash()
  372. else
  373. slashset.clicked = true
  374. end
  375. end)
  376. Events["KeyDown"] = mouse.KeyDown:connect(function(key)
  377. key:lower()
  378. local p = findClosestPlayer(torso.CFrame,4)
  379. if key=="q"and not Attacking and p then
  380. KS(p)
  381. end
  382. end)
  383. count = 0
  384. angle = 0
  385. counttime = 100
  386. countspeed = 1
  387. speed = .3
  388. Events["Loop"] = step:connect(function()
  389. count = (count%counttime)+countspeed
  390. angle = math.pi*math.sin((math.pi*2)/counttime*count)
  391. rootVel = Vector3.new(root.Velocity.x,0,root.Velocity.z)
  392. if target and not Spin then
  393. bg.cframe = CFrame.new(CFrame.new(root.CFrame.x,root.CFrame.y,root.CFrame.z).p,CFrame.new(target.CFrame.x,root.CFrame.y,target.CFrame.z).p)
  394. elseif not target and not Spin then
  395. bg.cframe = CFrame.new(CFrame.new(root.CFrame.x,root.CFrame.y,root.CFrame.z).p,CFrame.new(camera.CoordinateFrame.x,root.CFrame.y,camera.CoordinateFrame.z).p)*CFrame.Angles(0,math.pi,0)
  396. elseif Spin then
  397. Rad = Rad + 10
  398. bg.cframe = CFrame.new(root.CFrame.x,root.CFrame.y,root.CFrame.z)*CFrame.Angles(0,math.rad(Rad),0)
  399. end
  400. if rootVel.magnitude > 2 and not tweenLegs then
  401. counttime = 25
  402. countspeed = .75
  403. speed = .4
  404. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(-angle*speed*.75,0,-angle*speed*.1),speed)
  405. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(angle*speed*.75,0,-angle*speed*.1),speed)
  406. elseif rootVel.magnitude < 2 and not tweenLegs then
  407. lh.C0 = cslerp(lh.C0,c0.lh,speed)
  408. rh.C0 = cslerp(rh.C0,c0.rh,speed)
  409. end
  410. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement