HenloMyDude

Mech (Unfinished)

Dec 28th, 2019
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.68 KB | None | 0 0
  1.  
  2. -- by youngmacka123 --
  3.  
  4. script.Parent = owner.Character
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  7. local RealPlayer = Player
  8. do print("hi")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
  9.  
  10. plr = owner
  11. char = script.Parent
  12. ra = char["Right Arm"]
  13. la = char["Left Arm"]
  14. rl = char["Right Leg"]
  15. ll = char["Left Leg"]
  16. tors = char.Torso
  17. hed = char.Head
  18. root = char.HumanoidRootPart
  19. hum = char.Humanoid
  20. dancin = false
  21.  
  22. clerp = function(toclerp, cf, number)
  23. local joint = toclerp
  24. joint.C0 = joint.C0:Lerp(cf, number)
  25. end
  26.  
  27. clerp2 = function(toclerp, cf)
  28. local joint = toclerp
  29. joint.C0 = cf
  30. end
  31.  
  32. clerp3 = function(toclerp, cf, number)
  33. local joint = toclerp
  34. joint.C1 = joint.C1:Lerp(cf, number)
  35. end
  36.  
  37. Swait,swait = function(number)
  38. if number == 0 or number == nil then
  39. game:GetService("RunService").Heartbeat:Wait()
  40. else
  41. for i = 1,number do
  42. game:GetService("RunService").Heartbeat:Wait()
  43. end
  44. end
  45. end
  46.  
  47. ezweld = function(p, a, b, cf)
  48. local weld = Instance.new("Weld",p)
  49. weld.Part0 = a
  50. weld.Part1 = b
  51. weld.C0 = cf
  52. return weld
  53. end
  54.  
  55. NewSound = function(p, id, pit, vol, loop)
  56. local Sound = Instance.new("Sound",p)
  57. Sound.Pitch = pit
  58. Sound.Volume = vol
  59. Sound.SoundId = "rbxassetid://" ..id
  60. Sound.Looped = loop
  61. Sound:Play()
  62. return Sound
  63. end
  64.  
  65. IT = Instance.new
  66. Rad = math.rad
  67. Cos = math.cos
  68. Sin = math.sin
  69. BrickC = BrickColor.new
  70. C3 = Color3.new
  71. VT = Vector3.new
  72.  
  73. anim = "Idle"
  74. attack = false
  75. local RS = char.Torso["Right Shoulder"]
  76. local LS = char.Torso["Left Shoulder"]
  77. local RH = char.Torso["Right Hip"]
  78. local LH = char.Torso["Left Hip"]
  79. local neck = char.Torso["Neck"]
  80. local anim = "Idle"
  81. local animate = char.Animate
  82. local root = char.HumanoidRootPart
  83. local rootj = root.RootJoint
  84. local timepos = 0
  85. local sine = 0
  86. local RSnor = RS.C0
  87. local LSnor = LS.C0
  88. local RHnor = RH.C0
  89. local LHnor = LH.C0
  90. local RSnor2 = RS.C1
  91. local LSnor2 = LS.C1
  92. local RHnor2 = RH.C1
  93. local LHnor2 = LH.C1
  94. local rootjnor = rootj.C0
  95. local necknor = neck.C0
  96. local tors = char.Torso
  97. hum.Animator:remove()
  98. mouse = plr:GetMouse()
  99. hold = false
  100. Debris = game:GetService("Debris")
  101.  
  102. local dustp = Instance.new("Part", nil)
  103. dustp.Transparency = 1
  104. dustp.Size = Vector3.new(0.1, 0.1, 0.1)
  105. dustp.CanCollide = false
  106. dustp.Locked = true
  107. local dustj = ezweld(char, root, dustp, CFrame.new(0, -tors.Size.y - 0.5, 0))
  108. local dust = Instance.new("ParticleEmitter",dustp)
  109. dust.Rate = 3
  110. dust.Lifetime = NumberRange.new(0.35)
  111. dust.Texture = "rbxassetid://420061161"
  112. dust.Speed = NumberRange.new(2)
  113. dust.EmissionDirection = "Back"
  114. dust.Rotation = NumberRange.new(155)
  115. dust.RotSpeed = NumberRange.new(15)
  116. dust.Enabled = false
  117. dust.Size = NumberSequence.new(tors.Size.y - 1.5, tors.Size.y - 0.75)
  118. dust.Transparency = NumberSequence.new(0.25, 1)
  119. sped = 16
  120. hee = 15
  121. ae = false
  122. emrad = 0
  123.  
  124. function RayCast(Position, Direction, Range, Ignore)
  125. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  126. end
  127.  
  128. function addpart(p, size, trans, collide, anchor, color, bc)
  129. local part = Instance.new("Part", p)
  130. part.Size = size
  131. part.Transparency = trans
  132. part.CanCollide = collide
  133. part.Anchored = anchor
  134. if bc then
  135. part.BrickColor = BrickColor.new(color)
  136. else
  137. part.Color = color
  138. end
  139. return part
  140. end
  141.  
  142. function addmesh(p, scale, t, msh, txt)
  143. local mesh = Instance.new("SpecialMesh", p)
  144. mesh.Scale = scale
  145. mesh.MeshType = t
  146. if t == "FileMesh" then
  147. mesh.MeshId = "rbxassetid://" ..msh
  148. mesh.TextureId = "rbxassetid://" ..txt
  149. end
  150. end
  151.  
  152. sh = 0.25
  153.  
  154. body = Instance.new("Model", char)
  155. body.Name = "Body"
  156.  
  157. ra.Transparency = 1
  158. upr = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  159. upm = addmesh(upr, Vector3.new(1, 1, 1), "FileMesh", 4086240035, 4086231003)
  160. upw = ezweld(body, upr, ra, CFrame.new(0, -0.35, 0))
  161. lwr = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  162. lwm = addmesh(lwr, Vector3.new(1, 1, 1), "FileMesh", 4086240028, 4086231003)
  163. lww = ezweld(body, lwr, ra, CFrame.new(0.15, 0.425, 0))
  164. rhd = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  165. rhm = addmesh(rhd, Vector3.new(1, 1, 1), "FileMesh", 4086240025, 4086231003)
  166. rhw = ezweld(body, rhd, ra, CFrame.new(0.15, 1.05, 0))
  167.  
  168. la.Transparency = 1
  169. upl = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  170. upm = addmesh(upl, Vector3.new(1, 1, 1), "FileMesh", 4086240030, 4086227755)
  171. upw = ezweld(body, upl, la, CFrame.new(0, -0.35, 0))
  172. lwl = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  173. lwm = addmesh(lwl, Vector3.new(1, 1, 1), "FileMesh", 4086240052, 4086227755)
  174. lww = ezweld(body, lwl, la, CFrame.new(-0.15, 0.425, 0))
  175. lhd = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  176. lhm = addmesh(lhd, Vector3.new(1, 1, 1), "FileMesh", 4086240013, 4086227755)
  177. lhw = ezweld(body, lhd, la, CFrame.new(-0.15, 1.05, 0))
  178.  
  179. rl.Transparency = 1
  180. upr = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  181. upm = addmesh(upr, Vector3.new(1, 1, 1), "FileMesh", 4086240115, 4086232421)
  182. upw = ezweld(body, upr, rl, CFrame.new(0, -0.35 - sh, 0))
  183. lwr = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  184. lwm = addmesh(lwr, Vector3.new(1, 1, 1), "FileMesh", 4086240070, 4086232421)
  185. lww = ezweld(body, lwr, rl, CFrame.new(0, 0.535 - sh, -0.075))
  186. rft = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  187. rfm = addmesh(rft, Vector3.new(1, 1, 1), "FileMesh", 4086240077, 4086232421)
  188. rfw = ezweld(body, rft, rl, CFrame.new(0, 1.15 - sh, -0.075))
  189.  
  190. ll.Transparency = 1
  191. upl = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  192. upm = addmesh(upl, Vector3.new(1, 1, 1), "FileMesh", 4086240074, 4086229148)
  193. upw = ezweld(body, upl, ll, CFrame.new(0, -0.35 - sh, 0))
  194. lwl = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  195. lwm = addmesh(lwl, Vector3.new(1, 1, 1), "FileMesh", 4086240094, 4086229148)
  196. lww = ezweld(body, lwl, ll, CFrame.new(0, 0.535 - sh, -0.075))
  197. lft = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  198. lfm = addmesh(lft, Vector3.new(1, 1, 1), "FileMesh", 4086240057, 4086229148)
  199. lfw = ezweld(body, lft, ll, CFrame.new(0, 1.15 - sh, -0.075))
  200.  
  201. tors.Transparency = 1
  202. upt = addpart(body, Vector3.new(2.011, 0.598, 1.768), 0, false, false, Color3.new(1, 1, 1), false)
  203. upm = addmesh(upt, Vector3.new(1, 1, 1), "FileMesh", 4086240054, 4086234619)
  204. upw = ezweld(body, upt, tors, CFrame.new(0, -0.25, 0))
  205. lwt = addpart(body, Vector3.new(2.057, 1.485, 2.12), 0, false, false, Color3.new(1, 1, 1), false)
  206. lwm = addmesh(lwt, Vector3.new(1, 1, 1), "FileMesh", 4086240109, 4086234619)
  207. lww = ezweld(char, lwt, tors, CFrame.new(0, 0.75, 0))
  208.  
  209. hed.Transparency = 1
  210. hed:ClearAllChildren()
  211. hd = addpart(body, Vector3.new(1.194, 2.557, 2.074), 0, false, false, Color3.new(1, 1, 1), false)
  212. hdm = addmesh(hd, Vector3.new(1, 1, 1), "FileMesh", 4086240014, 4086236176)
  213. hdw = ezweld(body, hd, hed, CFrame.new(0, -0.425, 0.5))
  214.  
  215. for i,v in pairs (char:children()) do
  216. if v:IsA("Hat") or v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") then
  217. v:remove()
  218. end
  219. if v:IsA("Part") then
  220. v.BrickColor = BrickColor.new("Cyan")
  221. end
  222. if v:IsA("BodyColors") then
  223. v:remove()
  224. end
  225. end
  226.  
  227. danim = Instance.new("Animation")
  228. danim.AnimationId = "rbxassetid://132546884"
  229.  
  230. function projectorclone()
  231. char.Archivable = true
  232. local clone = char:Clone()
  233. clone.Parent = script
  234. clone.Name = " "
  235. clone.Torso.CFrame = root.CFrame * CFrame.new(3.5, 0, 0)
  236. for i,v in pairs (clone:children()) do
  237. if v:IsA("Script") or v:IsA("LocalScript") then
  238. v:remove()
  239. elseif v:IsA("Model") and v.Name == "Body" or v.Name == "effect" then
  240. v:remove()
  241. elseif v:IsA("BodyColors") then
  242. v:remove()
  243. elseif v:IsA("Motor6D") then
  244. if v.Name == "Right Shoulder" then
  245. v.C0 = RSnor
  246. elseif v.Name == "Left Shoulder" then
  247. v.C0 = LSnor
  248. elseif v.Name == "RootJoint" then
  249. v.C0 = rootjnor
  250. elseif v.Name == "Neck" then
  251. v.C0 = necknor
  252. elseif v.Name == "Right Hip" then
  253. v.C0 = RHnor
  254. elseif v.Name == "Left Hip" then
  255. v.C0 = LHnor
  256. end
  257. elseif v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  258. v.Material = "Neon"
  259. v.BrickColor = BrickColor.new("Cyan")
  260. coroutine.resume(coroutine.create(function()
  261. local t = 0
  262. while true do
  263. Swait()
  264. if t == 0 then
  265. t = 1
  266. v.Transparency = 0.8
  267. else
  268. t = 0
  269. v.Transparency = 0.7
  270. end
  271. end
  272. end))
  273. if v.Name == "Head" then
  274. v.Size = Vector3.new(1, 1, 1)
  275. end
  276. end
  277. if v:IsA("Humanoid") then
  278. local dance = v:LoadAnimation(danim)
  279. dance.Looped = true
  280. dance:Play()
  281. dance.DidLoop:connect(function()
  282. dance:Play()
  283. end)
  284. coroutine.resume(coroutine.create(function()
  285. while true do
  286. Swait()
  287. dance.Looped = true
  288. v.Health = 600
  289. v.MaxHealth = 600
  290. end
  291. end))
  292. end
  293. end
  294. end
  295.  
  296. hee = 25
  297. effects = Instance.new("Model", char)
  298. effects.Name = "effect"
  299.  
  300. function spark(cf, color, mat, ss, es, up, c)
  301. if not char:FindFirstChild("cool") then
  302. local cool = Instance.new("NumberValue", char)
  303. cool.Name = "cool"
  304. game:GetService("Debris"):AddItem(cool, c)
  305. local spark = Instance.new("Part", effects)
  306. spark.Size = ss
  307. spark.BrickColor = BrickColor.new(color)
  308. spark.Material = mat
  309. spark.CFrame = cf
  310. spark.Anchored = true
  311. spark.Locked = true
  312. spark.CanCollide = false
  313. local mesh = Instance.new("SpecialMesh", spark)
  314. mesh.MeshType = "Sphere"
  315. coroutine.resume(coroutine.create(function()
  316. for i = 1,35 do
  317. Swait()
  318. spark.Anchored = true
  319. spark.CanCollide = false
  320. spark.Transparency = spark.Transparency + 0.05
  321. spark.Size = spark.Size:Lerp(es, 0.05)
  322. spark.CFrame = spark.CFrame * CFrame.new(0, up, 0)
  323. end
  324. spark:remove()
  325. end))
  326. end
  327. end
  328.  
  329. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  330. local DIRECTION = CFrame.new(StartPos,EndPos).lookVector
  331. return RayCast(StartPos, DIRECTION, Distance, Ignore)
  332. end
  333.  
  334. function robobeam()
  335. for i = 1,45 do
  336. Swait()
  337. local radnom = CFrame.Angles(math.rad(math.random(-180,180)), math.rad(math.random(-180,180)), math.rad(math.random(-180,180)))
  338. spark(hed.CFrame * CFrame.new(0, 0, -0.75) * radnom, "Cyan", "Neon", Vector3.new(0.25, 0.75, 0.25), Vector3.new(0.4, 1.35, 0.4), 0.05, 0.075)
  339. end
  340. local FIREFROM = hed.CFrame * CFrame.new(0, 0, -0.75).p
  341. local HIT,POS = CastProperRay(FIREFROM,mouse.Hit.p,1000,char)
  342. if HIT then
  343. local dud = HIT.Parent
  344. if dud ~= char then
  345. for i,v in pairs (dud:children()) do
  346. if v:IsA("Humanoid") then
  347. v.Health = v.Health - 6
  348. end
  349. end
  350. end
  351. end
  352. local DISTANCE = (POS - FIREFROM).Magnitude
  353. local beam = Instance.new("Part", effects)
  354. beam.CanCollide = false
  355. beam.Locked = true
  356. beam.BrickColor = BrickColor.new("Cyan")
  357. beam.Material = "Neon"
  358. beam.CFrame = CFrame.new(FIREFROM,POS)*CFrame.new(0,0,-DISTANCE/2)
  359. beam.Size = Vector3.new(1, 1, 1)
  360. local mesh = Instance.new("SpecialMesh", beam)
  361. mesh.MeshType = "Sphere"
  362. mesh.Scale = Vector3.new(8, 8, DISTANCE)
  363. beam.Anchored = true
  364. for i = 1,257 do
  365. Swait()
  366. local FIREFROM = hed.CFrame * CFrame.new(0, 0, -0.75).p
  367. local HIT,POS = CastProperRay(FIREFROM,mouse.Hit.p,1000,char)
  368. if HIT then
  369. local dud = HIT.Parent
  370. if dud ~= char then
  371. for i,v in pairs (dud:children()) do
  372. if v:IsA("Humanoid") then
  373. v.Health = v.Health - 0.25
  374. end
  375. end
  376. end
  377. end
  378. local DISTANCE = (POS - FIREFROM).Magnitude
  379. beam.Anchored = true
  380. local radnom = CFrame.Angles(math.rad(math.random(-180,180)), math.rad(math.random(-180,180)), math.rad(math.random(-180,180)))
  381. mesh.Scale = mesh.Scale - Vector3.new(0.025, 0.025, 0)
  382. beam.CFrame = CFrame.new(FIREFROM,POS)*CFrame.new(0,0,-DISTANCE/2)
  383. mesh.Scale = Vector3.new(mesh.Scale.x, mesh.Scale.y, DISTANCE)
  384. beam.Transparency = beam.Transparency + 0.0035
  385. spark(beam.CFrame * CFrame.new(0, 0, -mesh.Scale.z / 2) * radnom, "Cyan", "Neon", Vector3.new(3.25, 4.75, 3.25), Vector3.new(3.4, 7.35, 3.4), 0.45, 0.065)
  386. end
  387. beam:remove()
  388. end
  389.  
  390. mouse.KeyDown:connect(function(key)
  391. if key == "e" then
  392. robobeam()
  393. end
  394. if key == "z" then
  395. projectorclone()
  396. end
  397. end)
  398.  
  399. broken = false
  400.  
  401. bodyp = {}
  402.  
  403. for i,v in pairs (body:GetChildren()) do
  404. if v:IsA("Part") then
  405. table.insert(bodyp, v)
  406. end
  407. end
  408.  
  409. local OWMYHEAD = math.rad(math.random(-180, 180))
  410.  
  411. local healer = char:FindFirstChild("Health")
  412. if healer then
  413. healer:remove()
  414. end
  415.  
  416. while true do
  417. Swait()
  418. if hum.Health > 50 then
  419. broken = false
  420. for i = 1, #bodyp do
  421. if bodyp[i] ~= nil then
  422. bodyp[i].Parent = body
  423. end
  424. end
  425. else
  426. broken = true
  427. rhd.Parent = nil
  428. lwr.Parent = nil
  429. rft.Parent = nil
  430. end
  431. twitch = math.random(1, 11)
  432. sparki = math.random(1, 20)
  433. OWMYHEAD = math.rad(math.random(-180, 180))
  434. sine = sine + 1
  435. hum.JumpPower = 45
  436. hum.WalkSpeed = sped
  437. hum.HipHeight = 0
  438. local TiltVelocity = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity/1.6))
  439. local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
  440. local WALKSPEEDVALUE = 6 / (hum.WalkSpeed / 16)
  441. torsverticalvel = root.Velocity.y
  442. hitfloor = RayCast(root.Position, (CFrame.new(root.Position, root.Position + Vector3.new(0, -1, 0))).lookVector, tors.Size.y+2+hum.HipHeight, char)
  443. if TORSOVELOCITY < 1 and hitfloor ~= nil then
  444. anim = "Idle"
  445. if attack == false then
  446. sped = 10
  447. dust.Enabled = false
  448. if broken == false then
  449. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.05 * Cos(sine / (77 / 2))), 0.3)
  450. clerp(neck, necknor * CFrame.Angles(Rad(0 + 0 * Cos(sine / (99 / 2))), 0, Rad(0 + 0 * Cos(sine / (99)))), 0.3)
  451. clerp(RH, RHnor * CFrame.Angles(Rad(0), Rad(-7), 0) * CFrame.new(0, -0.05 * Cos(sine / (77 / 2)), 0), 0.3)
  452. clerp(LH, LHnor * CFrame.Angles(Rad(0), Rad(7), 0) * CFrame.new(0, -0.05 * Cos(sine / (77 / 2)), 0), 0.3)
  453. clerp(RS, RSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-7), Rad(-11), 0), 0.3)
  454. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-7), Rad(11), 0), 0.3)
  455. else
  456. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.05 * Cos(sine / (77 / 2))) * CFrame.Angles(Rad(25), 0, 0), 0.3)
  457. clerp(neck, necknor * CFrame.Angles(Rad(0), 0, Rad(0)) * CFrame.Angles(Rad(25), 0, 0), 0.3)
  458. clerp(RH, RHnor * CFrame.Angles(Rad(0), Rad(-7), 0) * CFrame.new(0, -0.05 * Cos(sine / (77 / 2)), 0) * CFrame.Angles(Rad(-7), 0, Rad(-25)), 0.3)
  459. clerp(LH, LHnor * CFrame.Angles(Rad(0), Rad(7), 0) * CFrame.new(0, -0.05 * Cos(sine / (77 / 2)), 0) * CFrame.Angles(Rad(-7), 0, Rad(-25)), 0.3)
  460. clerp(RS, RSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-7), Rad(-11), Rad(35)), 0.3)
  461. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-7), Rad(11), Rad(-35)), 0.3)
  462. if twitch == 1 then
  463. neck.C0 = necknor * CFrame.Angles(OWMYHEAD, OWMYHEAD, OWMYHEAD)
  464. end
  465. if sparki == 1 then
  466. for i = 1,3 do
  467. Swait()
  468. local radnom = CFrame.Angles(math.rad(math.random(-180,180)), math.rad(math.random(-180,180)), math.rad(math.random(-180,180)))
  469. spark(ll.CFrame * CFrame.new(0.5, 0, 0) * radnom, "Bright yellow", "Neon", Vector3.new(0.25, 0.75, 0.25), Vector3.new(0.4, 1.35, 0.4), 0.05, 0.075)
  470. end
  471. end
  472. end
  473. end
  474. elseif TORSOVELOCITY > 1 and hitfloor ~= nil then
  475. anim = "Walk"
  476. if attack == false then
  477. sped = 16
  478. dust.Enabled = false
  479. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.05 * Cos(sine / (WALKSPEEDVALUE + 15))) * CFrame.Angles(-Rad((TiltVelocity.z / 2) + (TiltVelocity.z / 3) * Sin(sine / (WALKSPEEDVALUE / 2))) * 1, Rad(0) -Rad(TiltVelocity.x) * 0.4 + root.Velocity.y / 35, 0), 0.7)
  480. clerp(neck, necknor * CFrame.Angles(Rad((TiltVelocity.z / 2) + (TiltVelocity.z / 3) * Sin(sine / (WALKSPEEDVALUE / 2))) * 1, hed.Velocity.y / 35, 0), 0.7)
  481. clerp(RH, RHnor * CFrame.new(0 + 0.025 * Sin(sine / (WALKSPEEDVALUE / 1)), 0.05 + 0.1 * Sin(sine / (WALKSPEEDVALUE / 2)), 0) * CFrame.Angles(Rad(0 - hee * math.sin(sine / WALKSPEEDVALUE)*math.rad(TiltVelocity.x)*5.5), Rad(0), Rad(hee * Sin(sine / WALKSPEEDVALUE)) + 0 + Sin(sine / WALKSPEEDVALUE) / 3.5 * -Rad(TiltVelocity.z) * 10) * CFrame.new(0 + 0.1 * Sin(sine / WALKSPEEDVALUE), -0.025 * Cos(sine / 12), 0) * CFrame.new(0, 0.1 + 0.1 * Sin(sine / WALKSPEEDVALUE), 0), 0.3)
  482. clerp(LH, LHnor * CFrame.new(0 + 0.025 * Sin(sine / (WALKSPEEDVALUE / 1)), 0.05 + 0.1 * Sin(sine / (WALKSPEEDVALUE / 2)), 0) * CFrame.Angles(Rad(0 - hee * math.sin(sine / WALKSPEEDVALUE)*math.rad(TiltVelocity.x)*5.5), Rad(0), Rad(hee * Sin(sine / WALKSPEEDVALUE)) + 0 + Sin(sine / WALKSPEEDVALUE) / 3.5 * -Rad(TiltVelocity.z) * 10) * CFrame.new(0 + 0.1 * Sin(sine / WALKSPEEDVALUE), -0.025 * Cos(sine / 12), 0) * CFrame.new(0, 0.1 + 0.1 * Sin(sine / WALKSPEEDVALUE), 0), 0.3)
  483. clerp(RS, RSnor * CFrame.Angles(Rad(0), 0, Rad(0 - hee * Cos(sine / WALKSPEEDVALUE)) - 0 + -Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10), 0.3)
  484. clerp(LS, LSnor * CFrame.Angles(Rad(0), 0, Rad(0 - hee * Cos(sine / WALKSPEEDVALUE)) - 0 + -Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10), 0.3)
  485. end
  486. elseif torsverticalvel > 0.05 and hitfloor == nil then
  487. anim = "Jump"
  488. if attack == false then
  489. sped = 16
  490. dust.Enabled = false
  491. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.1 * Cos(sine / (WALKSPEEDVALUE + 15))) * CFrame.Angles(Rad(5), 0, 0), 0.3)
  492. clerp(neck, necknor * CFrame.Angles(Rad(-5), 0, 0), 0.3)
  493. clerp(RH, RHnor * CFrame.Angles(Rad(-6), Rad(-15), Rad(-20)) * CFrame.new(0, -0.1 * Cos(sine / (WALKSPEEDVALUE + 15)), 0), 0.3)
  494. clerp(LH, LHnor * CFrame.Angles(Rad(-6), Rad(15), Rad(20)) * CFrame.new(0, -0.1 * Cos(sine / (WALKSPEEDVALUE + 15)), 0), 0.3)
  495. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(20 + 6 * math.sin(sine / 12)), 0, Rad(160)), 0.3)
  496. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(20 + 6 * math.sin(sine / 12)), 0, Rad(-160)), 0.3)
  497. end
  498. elseif torsverticalvel < 0.05 and hitfloor == nil then
  499. anim = "Fall"
  500. if attack == false then
  501. sped = 16
  502. dust.Enabled = false
  503. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.1 * Cos(sine / 12)) * CFrame.Angles(Rad(-5), 0, 0), 0.3)
  504. clerp(neck, necknor * CFrame.Angles(Rad(25), 0, 0), 0.3)
  505. clerp(RH, RHnor * CFrame.Angles(Rad(-6), Rad(-15), Rad(25)) * CFrame.new(0, -0.1 * Cos(sine / 12), 0), 0.3)
  506. clerp(LH, LHnor * CFrame.Angles(Rad(-6), Rad(15), Rad(-25)) * CFrame.new(0, -0.1 * Cos(sine / 12), 0), 0.3)
  507. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, Rad(35)), 0.3)
  508. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, Rad(-35)), 0.3)
  509. end
  510. end
  511. end
Add Comment
Please, Sign In to add comment