Advertisement
rohanboi

(meeem)

Mar 3rd, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.59 KB | None | 0 0
  1. ----------------------------
  2. --/ \--
  3. -- Script By: 123jl123 --
  4. --\ Edit By /--
  5. --- williaminRoblox113 ---
  6. ---------------------------
  7.  
  8. --\ Had To Use Fe Code Becuase Of A Error. /--
  9.  
  10. wait(1/5)
  11.  
  12.  
  13. Player = nil
  14. if Player ~= nil then
  15. Player = game:GetService("Players").RoadRings
  16. else
  17. Player = game:GetService("Players")["RoadRings"]
  18. Player = game:GetService("Players")["RoadRings"]
  19.  
  20. end
  21.  
  22. ----------------------------------------------------------------------------------------------------------------------\
  23. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  24. InternalData = {}
  25. do
  26. script.Parent = owner.Character
  27. local Event = Instance.new("RemoteEvent")
  28. Event.Name = "UserInput"
  29. local function NewFakeEvent()
  30. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  31. return Fake
  32. end
  33. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  34. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  35. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  36. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  37. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  38. local function TriggerEvent(self,Event,...)
  39. local Trigger = Mouse[Event]
  40. if Trigger and Trigger.fakeEvent and Trigger.Function then
  41. Trigger.Function(...)
  42. end
  43. end
  44. Mouse.TrigEvent = TriggerEvent
  45. UserInputService.TrigEvent = TriggerEvent
  46. Event.OnServerEvent:Connect(function(FiredBy,Input)
  47. if FiredBy.Name ~= owner.Name then end
  48. if Input.MouseEvent then
  49. Mouse.Target = Input.Target
  50. Mouse.Hit = Input.Hit
  51. else
  52. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  53. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  54. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  55. end
  56. for _,Action in pairs(ContextActionService.Actions) do
  57. for _,Key in pairs(Action.Keys) do
  58. if Key==Input.KeyCode then
  59. Action.Function(Action.Name,Input.UserInputState,Input)
  60. end
  61. end
  62. end
  63. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  64. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  65. end
  66. end)
  67. InternalData["Mouse"] = Mouse
  68. InternalData["ContextActionService"] = ContextActionService
  69. InternalData["UserInputService"] = UserInputService
  70. Event.Parent = NLS([[
  71. local Player = owner
  72. local Event = script:WaitForChild("UserInput")
  73. local UserInputService = game:GetService("UserInputService")
  74. local Mouse = Player:GetMouse()
  75. local Input = function(Input,gameProcessedEvent)
  76. if gameProcessedEvent then return end
  77. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  78. end
  79. UserInputService.InputBegan:Connect(Input)
  80. UserInputService.InputEnded:Connect(Input)
  81. for i,v in pairs(owner.Character:GetDescendants()) do
  82. if v:IsA('Part') and v.Name ~= 'Head' and v.Name ~= 'Torso' and (v.Name ~= 'Handle' and not v.Parent:IsA('Accessory')) then
  83. v.LocalTransparencyModifier = 0
  84. v.Changed:Connect(function()
  85. v.LocalTransparencyModifier = 0
  86. end)
  87. end
  88. end
  89. local Hit,Target
  90. while wait(1/30) do
  91. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  92. Hit,Target = Mouse.Hit,Mouse.Target
  93. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  94. end
  95. end
  96. Character.Humanoid.Name = 'MeeMtimeboi'
  97. ]],owner.Character)
  98. end
  99. RealGame = game;game = setmetatable({},{
  100. __index = function (self,Index)
  101. local Sandbox = function (Thing)
  102. if Thing:IsA("Player") then
  103. local RealPlayer = Thing
  104. return setmetatable({},{
  105. __index = function (self,Index)
  106. local Type = type(RealPlayer[Index])
  107. if Type == "function" then
  108. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  109. return function (self)
  110. return InternalData["Mouse"]
  111. end
  112. end
  113. return function (self,...)
  114. return RealPlayer[Index](RealPlayer,...)
  115. end
  116. else
  117. if Index == "PlrObj" then
  118. return RealPlayer
  119. end
  120. return RealPlayer[Index]
  121. end
  122. end;
  123. __tostring = function(self)
  124. return RealPlayer.Name
  125. end
  126. })
  127. end
  128. end
  129. if RealGame[Index] then
  130. local Type = type(RealGame[Index])
  131. if Type == "function" then
  132. if Index:lower() == "getservice" or Index:lower() == "service" then
  133. return function (self,Service)
  134. if Service:lower() == "players" then
  135. return setmetatable({},{
  136. __index = function (self2,Index2)
  137. local RealService = RealGame:GetService(Service)
  138. local Type2 = type(Index2)
  139. if Type2 == "function" then
  140. return function (self,...)
  141. return RealService[Index2](RealService,...)
  142. end
  143. else
  144. if Index2:lower() == "localplayer" then
  145. return Sandbox(owner)
  146. end
  147. return RealService[Index2]
  148. end
  149. end;
  150. __tostring = function(self)
  151. return RealGame:GetService(Service).Name
  152. end
  153. })
  154. elseif Service:lower() == "contextactionservice" then
  155. return InternalData["ContextActionService"]
  156. elseif Service:lower() == "contextactionservice" then
  157. return InternalData["UserInputService"]
  158. elseif Service:lower() == "runservice" then
  159. return setmetatable({},{
  160. __index = function(self2,Index2)
  161. local RealService = RealGame:GetService(Service)
  162. local Type2 = type(Index2)
  163. if Type2 == "function" then
  164. return function (self,...)
  165. return RealService[Index2](RealService,...)
  166. end
  167. else
  168. if Index2:lower() == "bindtorenderstep" then
  169. return function (self,Name,Priority,Function)
  170. return RealGame:GetService("RunService").Stepped:Connect(Function)
  171. end
  172. end
  173. if Index2:lower() == "renderstepped" then
  174. return RealService["Stepped"]
  175. end
  176. return RealService[Index2]
  177. end
  178. end
  179. })
  180. else
  181. return RealGame:GetService(Service)
  182. end
  183. end
  184. end
  185. return function (self,...)
  186. return RealGame[Index](RealGame,...)
  187. end
  188. else
  189. if game:GetService(Index) then
  190. return game:GetService(Index)
  191. end
  192. return RealGame[Index]
  193. end
  194. else
  195. return nil
  196. end
  197. end
  198. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  199. --------------------------------------------------------------------------\
  200.  
  201.  
  202. Player = game:GetService("Players").LocalPlayer
  203. Character = Player.Character
  204. PlayerGui = Player.PlayerGui
  205. Backpack = Player.Backpack
  206. Torso = Character.Torso
  207. Head = Character.Head
  208. Humanoid = Character.Humanoid
  209. LeftArm = Character["Left Arm"]
  210. LeftLeg = Character["Left Leg"]
  211. RightArm = Character["Right Arm"]
  212. RightLeg = Character["Right Leg"]
  213. ch = Character
  214. RootPart = Character.HumanoidRootPart
  215. RootJoint = RootPart.RootJoint
  216. local Anim="Idle"
  217. local inAir = false
  218. local inAir2 = false
  219. local attack = false
  220. it=Instance.new
  221. vt=Vector3.new
  222. cf=CFrame.new
  223. euler=CFrame.fromEulerAnglesXYZ
  224. angles=CFrame.Angles
  225. local cn = CFrame.new
  226. mr=math.rad
  227. local sprintmode=false
  228. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  229. local NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  230. local Anim="Idle"
  231. local RJ = Character.HumanoidRootPart:FindFirstChild("RootJoint")
  232. local Neck = Character.Torso:FindFirstChild("Neck")
  233. function weld(parent,part0,part1,c0)
  234. local weld=it("Weld")
  235. weld.Parent=parent
  236. weld.Part0=part0
  237. weld.Part1=part1
  238. weld.C0=c0
  239. return weld
  240. end
  241. local inairvel=0
  242. local sine = 0
  243. local change = 1
  244. local nextstep=0
  245. local CanUseWalkSound = true
  246. idletime = 0
  247. idletimeM = 0
  248. idleAnim=0
  249. local Mouse = Player:GetMouse()
  250. local s2=Instance.new("Sound",Torso)
  251. local CurId = 1
  252. s2.EmitterSize = 30
  253. local s2c=s2:Clone()
  254. local lastid= "http://www.roblox.com/asset/?id=762141368"
  255. omegawait = false
  256. playsong = false
  257. CookieMode = 1
  258. s2.SoundId = lastid
  259. if playsong == true then
  260. s2:play()
  261. elseif playsong == false then
  262. s2:stop()
  263. end
  264. lastsongpos= 0
  265.  
  266. warn('MeeM script by 123jl123')
  267. warn('Edit by williaminRoblox113')
  268.  
  269. warn('Moves:')
  270.  
  271. warn('F - Detroit Become Human Grab')
  272. warn('G - Throw Cookie')
  273. warn('Z - Change Cookie')
  274. warn('H - MeeM TPose')
  275. warn('J - (NoAttackYet) ')
  276. warn('N - Change Music')
  277. warn('M - Play Music')
  278.  
  279.  
  280.  
  281. function stopAnimations()
  282. coroutine.resume(coroutine.create(function()
  283. Character.Animate:Destroy()
  284. Character.Humanoid.Animator:Destroy()
  285. end))
  286. coroutine.resume(coroutine.create(function()
  287. for _,v in pairs(Humanoid:GetPlayingAnimationTracks()) do
  288. v:Stop()
  289.  
  290. end
  291. end))
  292. end
  293.  
  294. local cR=255
  295. local cG=0
  296. local cB=0
  297. local flg5=1
  298. local omgidk=1
  299. local add=7.5
  300. local color
  301. game:GetService('RunService').Stepped:Connect(function()
  302. if omgidk>10000 then omgidk=0 end
  303. omgidk=omgidk+1
  304. if cR>=255 then flg5=1 end
  305. if cG>=255 then flg5=2 end
  306. if cB>=255 then flg5=3 end
  307. if flg5==1 then cR=cR-add cG=cG+add end
  308. if flg5==2 then cG=cG-add cB=cB+add end
  309. if flg5==3 then cB=cB-add cR=cR+add end
  310. color=Color3.fromRGB(cR,cG,cB)
  311. end)
  312.  
  313. stopAnimations()
  314. coroutine.resume(coroutine.create(function()
  315. Character:WaitForChild("Sound")
  316. Character.Sound:Destroy()
  317. end))
  318.  
  319. local RbxUtility = LoadLibrary("RbxUtility")
  320. local Create = RbxUtility.Create
  321. local Ang=Instance.new("Model")
  322. Ang.Name="Angles"
  323. Ang.Parent=Character
  324.  
  325. local rrx=Instance.new("NumberValue")
  326. rrx.Name="X"
  327. rrx.Parent=Ang
  328. rrx.Value=0
  329. local rry=Instance.new("NumberValue")
  330. rry.Name="Y"
  331. rry.Parent=Ang
  332. rry.Value=0
  333. local rrz=Instance.new("NumberValue")
  334. rrz.Name="Z"
  335. rrz.Parent=Ang
  336. rrz.Value=0
  337.  
  338.  
  339. function RemoveOutlines(part)
  340. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  341. end
  342.  
  343.  
  344.  
  345.  
  346. CFuncs = {
  347. Part = {Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  348.  
  349. local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
  350. RemoveOutlines(Part)
  351. return Part
  352. end
  353. }
  354. ,
  355. Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  356.  
  357. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  358. if Mesh == "SpecialMesh" then
  359. Msh.MeshType = MeshType
  360. Msh.MeshId = MeshId
  361. end
  362. return Msh
  363. end
  364. }
  365. ,
  366. Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  367.  
  368. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  369. if Mesh == "SpecialMesh" then
  370. Msh.MeshType = MeshType
  371. Msh.MeshId = MeshId
  372. end
  373. return Msh
  374. end
  375. }
  376. ,
  377. Weld = {Create = function(Parent, Part0, Part1, C0, C1)
  378.  
  379. local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
  380. return Weld
  381. end
  382. }
  383. ,
  384. Sound = {Create = function(id, par, vol, pit)
  385.  
  386. coroutine.resume(coroutine.create(function()
  387.  
  388. local S = Create("Sound")({Volume = vol, Pitch = pit or 1, SoundId = "http://www.roblox.com/asset/?id="..id, Parent = par or workspace})
  389. wait()
  390. S:play()
  391. game:GetService("Debris"):AddItem(S, 6)
  392. end
  393. ))
  394. end
  395. }
  396. ,
  397. ParticleEmitter = {Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  398.  
  399. local fp = Create("ParticleEmitter")({Parent = Parent, Color = ColorSequence.new(Color1, Color2), LightEmission = LightEmission, Size = Size, Texture = Texture, Transparency = Transparency, ZOffset = ZOffset, Acceleration = Accel, Drag = Drag, LockedToPart = LockedToPart, VelocityInheritance = VelocityInheritance, EmissionDirection = EmissionDirection, Enabled = Enabled, Lifetime = LifeTime, Rate = Rate, Rotation = Rotation, RotSpeed = RotSpeed, Speed = Speed, VelocitySpread = VelocitySpread})
  400. return fp
  401. end
  402. }
  403. }
  404.  
  405. local Particle0 = Create("ParticleEmitter"){
  406. Color = ColorSequence.new(Color3.new (1,1,1), Color3.new (0, 0, 0)),
  407. Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.1,.8),NumberSequenceKeypoint.new(0.3,.6),NumberSequenceKeypoint.new(0.5,.2),NumberSequenceKeypoint.new(1,.8)}),
  408. Size = NumberSequence.new({NumberSequenceKeypoint.new(0,.65),NumberSequenceKeypoint.new(0.25,.20),NumberSequenceKeypoint.new(0.7,.18),NumberSequenceKeypoint.new(1,0)}),
  409. Texture = "rbxassetid://118641183",
  410. Lifetime = NumberRange.new(0.95),
  411. Rate = 100,
  412. VelocitySpread = 60,
  413. Rotation = NumberRange.new(0),
  414. RotSpeed = NumberRange.new(-200,200),
  415. Speed = NumberRange.new(8.0),
  416. LightEmission = .6,
  417. LockedToPart = false,
  418. Acceleration = Vector3.new(0, 4, 0),
  419. EmissionDirection = "Top",
  420. Drag = 4,
  421. Enabled = false
  422. }
  423. local Particle1 = Create("ParticleEmitter"){
  424. Color = ColorSequence.new(Color3.new (0,0,0), Color3.new (.5, .5, .5)),
  425. Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.8),NumberSequenceKeypoint.new(.5,.8),NumberSequenceKeypoint.new(1,1)}),
  426. Size = NumberSequence.new({NumberSequenceKeypoint.new(0,.2),NumberSequenceKeypoint.new(.5,1),NumberSequenceKeypoint.new(1,.5)}),
  427. Texture = "rbxassetid://688705835",
  428. Lifetime = NumberRange.new(.8),
  429. Rate = 0,
  430. VelocitySpread = 50,
  431. ZOffset = .5,
  432. Rotation = NumberRange.new(0),
  433. RotSpeed = NumberRange.new(-200,200),
  434. Speed = NumberRange.new(5.0),
  435. LightEmission = 0,
  436. LockedToPart = false,
  437. Acceleration = Vector3.new(0, -10, 0),
  438. EmissionDirection = "Top",
  439. Drag = 1,
  440. Enabled = false
  441. }
  442.  
  443. so = function(id, par, vol, pit)
  444.  
  445. CFuncs.Sound.Create(id, par, vol, pit)
  446.  
  447.  
  448. end
  449.  
  450. rayCast = function(Pos, Dir, Max, Ignore)
  451.  
  452. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  453. end
  454.  
  455.  
  456. function swait(num)
  457. if num==0 or num==nil then
  458. --if Stagger.Value==false or Stun.Value<=100 then
  459. --Player.PlayerGui.Pacemaker.Heartbeat.Event:wait()
  460. game:GetService('RunService').Stepped:Wait(0)
  461. --end
  462. else
  463. for i=0,num do
  464. --Player.PlayerGui.Pacemaker.Heartbeat.Event:wait()
  465. game:GetService('RunService').Stepped:Wait(0)
  466. --[[if Stagger.Value==true or Stun.Value>=StunT.Value then
  467. break
  468. end]]
  469. end
  470. end
  471. end
  472.  
  473. function CreateMesh2(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  474. local NEWMESH = it(MESH)
  475. if MESH == "SpecialMesh" then
  476. NEWMESH.MeshType = MESHTYPE
  477. if MESHID ~= "nil" and MESHID ~= "" then
  478. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  479. end
  480. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  481. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  482. end
  483. end
  484. NEWMESH.Offset = OFFSET or Vector3.new(0, 0, 0)
  485. NEWMESH.Scale = SCALE
  486. NEWMESH.Parent = PARENT
  487. return NEWMESH
  488. end
  489. function clerp(a,b,t)
  490. local qa = {QuaternionFromCFrame(a)}
  491. local qb = {QuaternionFromCFrame(b)}
  492. local ax, ay, az = a.x, a.y, a.z
  493. local bx, by, bz = b.x, b.y, b.z
  494. local _t = 1-t
  495. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  496. end
  497.  
  498. function QuaternionFromCFrame(cf)
  499. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  500. local trace = m00 + m11 + m22
  501. if trace > 0 then
  502. local s = math.sqrt(1 + trace)
  503. local recip = 0.5/s
  504. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  505. else
  506. local i = 0
  507. if m11 > m00 then
  508. i = 1
  509. end
  510. if m22 > (i == 0 and m00 or m11) then
  511. i = 2
  512. end
  513. if i == 0 then
  514. local s = math.sqrt(m00-m11-m22+1)
  515. local recip = 0.5/s
  516. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  517. elseif i == 1 then
  518. local s = math.sqrt(m11-m22-m00+1)
  519. local recip = 0.5/s
  520. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  521. elseif i == 2 then
  522. local s = math.sqrt(m22-m00-m11+1)
  523. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  524. end
  525. end
  526. end
  527. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  528. local xs, ys, zs = x + x, y + y, z + z
  529. local wx, wy, wz = w*xs, w*ys, w*zs
  530. local xx = x*xs
  531. local xy = x*ys
  532. local xz = x*zs
  533. local yy = y*ys
  534. local yz = y*zs
  535. local zz = z*zs
  536. 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))
  537. end
  538. function QuaternionSlerp(a, b, t)
  539. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  540. local startInterp, finishInterp;
  541. if cosTheta >= 0.0001 then
  542. if (1 - cosTheta) > 0.0001 then
  543. local theta = math.acos(cosTheta)
  544. local invSinTheta = 1/math.sin(theta)
  545. startInterp = math.sin((1-t)*theta)*invSinTheta
  546. finishInterp = math.sin(t*theta)*invSinTheta
  547. else
  548. startInterp = 1-t
  549. finishInterp = t
  550. end
  551. else
  552. if (1+cosTheta) > 0.0001 then
  553. local theta = math.acos(-cosTheta)
  554. local invSinTheta = 1/math.sin(theta)
  555. startInterp = math.sin((t-1)*theta)*invSinTheta
  556. finishInterp = math.sin(t*theta)*invSinTheta
  557. else
  558. startInterp = t-1
  559. finishInterp = t
  560. end
  561. end
  562. 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
  563. end
  564.  
  565.  
  566.  
  567.  
  568.  
  569. local RW=weld(Torso,Torso,RightArm,cf(0,0,0))
  570.  
  571. local LW=weld(Torso,Torso,LeftArm,cf(0,0,0))
  572.  
  573. local RH=weld(Torso,Torso,RightLeg,cf(0,0,0))
  574.  
  575. local LH=weld(Torso,Torso,LeftLeg,cf(0,0,0))
  576.  
  577.  
  578.  
  579. RW.C1 = cn(0, 0.5, 0)
  580. LW.C1 = cn(0, 0.5, 0)
  581. RH.C1 = cn(0, 1, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  582. LH.C1 = cn(0, 1, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  583.  
  584.  
  585. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  586. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  587.  
  588.  
  589. --[[
  590. for i = 0,5,.1 do swait()
  591. Humanoid.WalkSpeed = 12
  592. Humanoid.JumpPower = 60
  593.  
  594. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  595. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  596. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  597. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  598. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  599. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  600.  
  601.  
  602.  
  603.  
  604. end
  605. ]]--
  606.  
  607. function Attack1()
  608. attack = true
  609.  
  610. for i = 0,2,.1 do swait()
  611. Humanoid.WalkSpeed = 12
  612. Humanoid.JumpPower = 60
  613.  
  614. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-40)), .15)
  615. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(40 - 0 * math.cos(sine / 8/3))), .15)
  616. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(-90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  617. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  618. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  619. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  620.  
  621.  
  622.  
  623.  
  624. end
  625.  
  626. HTorso=nil
  627. local TheGunHandle = Instance.new("Part")
  628. TheGunHandle.Reflectance = 0
  629. TheGunHandle.Transparency = 1
  630. TheGunHandle.CanCollide = false
  631. TheGunHandle.Locked = true
  632. TheGunHandle.Anchored=false
  633. TheGunHandle.BrickColor = BrickColor.new("Really blue")
  634. TheGunHandle.Name = "BHandle"
  635. TheGunHandle.Size = RightArm.Size
  636. TheGunHandle.Material = "SmoothPlastic"
  637. TheGunHandle:BreakJoints()
  638. TheGunHandle.Parent = Character
  639. TheGunHandle.CFrame = RightArm.CFrame
  640. local SWeld=weld(TheGunHandle,RightArm,TheGunHandle,cf(0,0,0))
  641. local function onTouch(part)
  642. if part.Parent ~= Character and part.Parent.Parent ~= Character then
  643. if part.Parent:FindFirstChildOfClass("Humanoid") then
  644.  
  645.  
  646. if part.Parent:FindFirstChild("Head") then
  647. HTorso= part.Parent:FindFirstChild("Head")
  648. end
  649. coroutine.resume(coroutine.create(function()
  650. TheGunHandle:Destroy()
  651. end))
  652.  
  653.  
  654. end
  655. end
  656. end
  657.  
  658.  
  659.  
  660. TheGunHandle.Touched:connect(onTouch)
  661.  
  662. for i = 0,5,.1 do if HTorso== nil then
  663.  
  664. swait()
  665. Humanoid.WalkSpeed = 12
  666. Humanoid.JumpPower = 60
  667. local bodvol = Create("BodyVelocity")({velocity = RootPart.CFrame.lookVector * 23, P = 50, maxForce = Vector3.new(math.huge, 0, math.huge), Parent = RootPart})
  668.  
  669. game:GetService("Debris"):AddItem(bodvol, 0.1)
  670. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(40)), .3)
  671. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-40 - 0 * math.cos(sine / 8/3))), .3)
  672. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.3)
  673. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.3)
  674. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.3)
  675. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.3)
  676.  
  677. end
  678.  
  679.  
  680. end
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687. coroutine.resume(coroutine.create(function()
  688. TheGunHandle:Destroy()
  689. end))
  690.  
  691. if HTorso ~= nil then
  692. local keeps=true
  693. local TorsoCF = HTorso.CFrame
  694. so("1956239759", RootPart,2, 1)
  695. coroutine.resume(coroutine.create(function()
  696. TorsoCF = HTorso.CFrame
  697. while keeps==true do wait()
  698. HTorso.Anchored=true
  699. HTorso.CFrame = TorsoCF
  700. end
  701. HTorso.Anchored=false
  702. end))
  703. RootPart.CFrame= cn(HTorso.Position+Vector3.new(0,-1,0)+HTorso.CFrame.lookVector * 3 ,HTorso.Position)
  704. RootPart.Anchored=true
  705. RootPart.Velocity = Vector3.new(0,0,0)
  706. for i = 0,5,.1 do swait()
  707. Humanoid.WalkSpeed = 12
  708. Humanoid.JumpPower = 60
  709.  
  710. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  711. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  712. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  713. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  714. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  715. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  716.  
  717.  
  718.  
  719.  
  720. end
  721. for i = 0,16,.1 do swait()
  722. Humanoid.WalkSpeed = 12
  723. Humanoid.JumpPower = 60
  724.  
  725. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(360*i)), .35)
  726. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-360*i - 0 * math.cos(sine / 8/3))), .35)
  727. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(75 + 0 * math.cos(sine / 8))), 0.15)
  728. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-75 - 0 * math.cos(sine / 8))), 0.15)
  729. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(0 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  730. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(0 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  731.  
  732. coroutine.resume(coroutine.create(function()
  733. RootPart.CFrame= cn(HTorso.Position+Vector3.new(0,-1,0)+HTorso.CFrame.lookVector * 3 ,HTorso.Position)
  734. RootPart.Anchored=true
  735. RootPart.Velocity = Vector3.new(0,0,0)
  736. end))
  737. end
  738.  
  739. coroutine.resume(coroutine.create(function()
  740. coroutine.resume(coroutine.create(function()
  741. RootPart.CFrame= cn(HTorso.Position+Vector3.new(0,-1,0)+HTorso.CFrame.lookVector * 3 ,HTorso.Position+Vector3.new(0,-1,0))
  742. RootPart.Anchored=true
  743. RootPart.Velocity = Vector3.new(0,0,0)
  744. end))
  745. HTorso.Parent:BreakJoints()
  746. keeps=false end))
  747.  
  748. for i = 0,2,.1 do swait()
  749. Humanoid.WalkSpeed = 12
  750. Humanoid.JumpPower = 60
  751.  
  752. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  753. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  754. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  755. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  756. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  757. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  758.  
  759. coroutine.resume(coroutine.create(function()
  760. RootPart.Anchored=false
  761.  
  762. end))
  763.  
  764.  
  765. end
  766.  
  767. for i = 0,5,.1 do swait()
  768. Humanoid.WalkSpeed = 12
  769. Humanoid.JumpPower = 60
  770.  
  771. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  772. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(-23.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  773. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(160 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  774. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(160 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  775. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  776. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  777.  
  778.  
  779. coroutine.resume(coroutine.create(function()
  780. RootPart.Anchored=false
  781.  
  782. end))
  783. end
  784.  
  785. for i = 0,2,.1 do swait()
  786. Humanoid.WalkSpeed = 12
  787. Humanoid.JumpPower = 60
  788.  
  789. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  790. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  791. RW.C0 = clerp(RW.C0, CFrame.new(1.2 , 0.5, -.2) * angles(math.rad(45 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-60 + 0 * math.cos(sine / 8))), 0.15)
  792. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.5, -.2) * angles(math.rad(45 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(60 - 0 * math.cos(sine / 8))), 0.15)
  793. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  794. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  795.  
  796.  
  797. coroutine.resume(coroutine.create(function()
  798. RootPart.Anchored=false
  799.  
  800. end))
  801.  
  802. end
  803. RootPart.Anchored=false
  804. RootPart.Velocity = Vector3.new(0,0,0)
  805. end
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813. attack = false
  814. end
  815.  
  816.  
  817.  
  818.  
  819. function ChangeCookie()
  820. attack = true
  821.  
  822. CookieMode = CookieMode+1
  823. if CookieMode > 6 then
  824. CookieMode = 1
  825. end
  826. for i = 0,1,.1 do swait()
  827. Humanoid.WalkSpeed = 0
  828. Humanoid.JumpPower = 0
  829.  
  830. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-10)), .15)
  831. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(10 - 0 * math.cos(sine / 8/3))), .15)
  832. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.7, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  833. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  834. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  835. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  836.  
  837.  
  838.  
  839.  
  840. end
  841.  
  842. local TheGunHandle = Instance.new("Part")
  843. TheGunHandle.Reflectance = 0
  844. TheGunHandle.Transparency = 0
  845. TheGunHandle.CanCollide = true
  846. TheGunHandle.Locked = true
  847. TheGunHandle.Anchored=false
  848. TheGunHandle.BrickColor = BrickColor.new("Really blue")
  849. TheGunHandle.Name = "BHandle"
  850. TheGunHandle.Size = Vector3.new(1,0.2,1)
  851. TheGunHandle.Material = "SmoothPlastic"
  852. TheGunHandle:BreakJoints()
  853. TheGunHandle.Parent = workspace
  854. TheGunHandle.CFrame = RightArm.CFrame
  855.  
  856.  
  857. local MSH = CreateMesh2("SpecialMesh", TheGunHandle, "FileMesh", "1202473244", "", vt(1,1,1), vt(0,0,0))
  858. MSH.TextureId = "rbxassetid://1202473285"
  859.  
  860.  
  861. if CookieMode == 1 then
  862. MSH.VertexColor = Vector3.new(1,1,1)
  863. elseif CookieMode == 2 then
  864. MSH.VertexColor = Vector3.new(.05,1,.05)
  865. elseif CookieMode == 3 then
  866. game:GetService('RunService').Stepped:Connect(function()
  867. if MSH ~= nil then
  868. MSH.VertexColor = Vector3.new(color.r,color.g,color.b)
  869. end
  870. end)
  871. elseif CookieMode == 4 then
  872. MSH.VertexColor = Vector3.new(1,.5,1)
  873. elseif CookieMode == 5 then
  874. MSH.VertexColor = Vector3.new(.0,.0,.0)
  875. elseif CookieMode == 6 then
  876. MSH.VertexColor = Vector3.new(1,.3,.3)
  877. end
  878.  
  879.  
  880. local SWeld=weld(TheGunHandle,RightArm,TheGunHandle,cf(0,-1.5,0)*angles(math.rad(90),math.rad(0),math.rad(180)))
  881.  
  882. for i = 0,2,.1 do swait()
  883. Humanoid.WalkSpeed = 0
  884. Humanoid.JumpPower = 0
  885.  
  886. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-0)), .2)
  887. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-20 - 0 * math.cos(sine / 8/3))), .2)
  888. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.2)
  889. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  890. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  891. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  892.  
  893.  
  894.  
  895.  
  896. end
  897.  
  898.  
  899.  
  900. for i = 0,1,.1 do swait()
  901. Humanoid.WalkSpeed = 0
  902. Humanoid.JumpPower = 0
  903.  
  904. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-10)), .15)
  905. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(10 - 0 * math.cos(sine / 8/3))), .15)
  906. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.7, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  907. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  908. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  909. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  910.  
  911.  
  912.  
  913.  
  914. end
  915. TheGunHandle:Destroy()
  916.  
  917. Humanoid.WalkSpeed = 12
  918. Humanoid.JumpPower = 60
  919. attack=false
  920. end
  921.  
  922.  
  923. function Attack2()
  924. attack = true
  925. for i = 0,.5,.1 do swait()
  926. Humanoid.WalkSpeed = 12
  927. Humanoid.JumpPower = 60
  928.  
  929. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-80)), .15)
  930. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(80 - 0 * math.cos(sine / 8/3))), .15)
  931. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.7, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  932. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  933. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  934. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  935.  
  936.  
  937.  
  938.  
  939. end
  940.  
  941. local TheGunHandle = Instance.new("Part")
  942. TheGunHandle.Reflectance = 0
  943. TheGunHandle.Transparency = 0
  944. TheGunHandle.CanCollide = true
  945. TheGunHandle.Locked = true
  946. TheGunHandle.Anchored=false
  947. TheGunHandle.BrickColor = BrickColor.new("Really blue")
  948. TheGunHandle.Name = "BHandle"
  949. TheGunHandle.Size = Vector3.new(1,0.2,1)
  950. TheGunHandle.Material = "SmoothPlastic"
  951. TheGunHandle:BreakJoints()
  952. TheGunHandle.Parent = workspace
  953. TheGunHandle.CFrame = RightArm.CFrame
  954.  
  955.  
  956. local MSH = CreateMesh2("SpecialMesh", TheGunHandle, "FileMesh", "1202473244", "", vt(1,1,1), vt(0,0,0))
  957. MSH.TextureId = "rbxassetid://1202473285"
  958. if CookieMode == 1 then
  959. MSH.VertexColor = Vector3.new(1,1,1)
  960. elseif CookieMode == 2 then
  961. MSH.VertexColor = Vector3.new(.05,1,.05)
  962. elseif CookieMode == 3 then
  963. game:GetService('RunService').Stepped:Connect(function()
  964. if MSH ~= nil then
  965. MSH.VertexColor = Vector3.new(color.r,color.g,color.b)
  966. end
  967. end)
  968. elseif CookieMode == 4 then
  969. MSH.VertexColor = Vector3.new(1,.5,1)
  970. elseif CookieMode == 5 then
  971. MSH.VertexColor = Vector3.new(.0,.0,.0)
  972. elseif CookieMode == 6 then
  973. MSH.VertexColor = Vector3.new(1,.3,.3)
  974. end
  975. local SWeld=weld(TheGunHandle,RightArm,TheGunHandle,cf(0,-1.5,0)*angles(math.rad(90),math.rad(0),math.rad(180)))
  976. for i = 0,.5,.1 do swait()
  977. Humanoid.WalkSpeed = 12
  978. Humanoid.JumpPower = 60
  979.  
  980. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(-80)), .2)
  981. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(80 - 0 * math.cos(sine / 8/3))), .2)
  982. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.2)
  983. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  984. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  985. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  986.  
  987.  
  988.  
  989.  
  990. end
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997. for i = 0,.5,.1 do swait()
  998. Humanoid.WalkSpeed = 12
  999. Humanoid.JumpPower = 60
  1000.  
  1001. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(70)), .3)
  1002. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-70 - 0 * math.cos(sine / 8/3))), .3)
  1003. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.3)
  1004. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  1005. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1006. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1007.  
  1008.  
  1009.  
  1010.  
  1011. end
  1012.  
  1013. local bodvol = Create("BodyVelocity")({velocity = RootPart.CFrame.lookVector * 50, P = 50, maxForce = Vector3.new(math.huge, math.huge, math.huge), Parent = TheGunHandle})
  1014.  
  1015.  
  1016.  
  1017. game:GetService("Debris"):AddItem(bodvol, 0.1)
  1018.  
  1019.  
  1020. local function onTouch(part)
  1021. if part.Parent ~= Character and part.Parent.Parent ~= Character then
  1022. if part.Parent:FindFirstChildOfClass("Humanoid") then
  1023.  
  1024.  
  1025. if part.Parent:FindFirstChild("Head") then
  1026. HTorso= part.Parent:FindFirstChild("Head")
  1027. end
  1028.  
  1029. if HTorso ~= nil then
  1030.  
  1031.  
  1032. so("1575472350", HTorso,1.5, 1)
  1033. local HC = TheGunHandle:Clone()
  1034. coroutine.resume(coroutine.create(function()
  1035. TheGunHandle.TouchInterest:Destroy()
  1036. end))
  1037. coroutine.resume(coroutine.create(function()
  1038. TheGunHandle.Parent = nil
  1039. end))
  1040.  
  1041. local RandomEffect=CookieMode
  1042. if RandomEffect == 1 then
  1043. wait(.5)
  1044. coroutine.resume(coroutine.create(function()
  1045. TheGunHandle:Destroy()
  1046. end))
  1047. local HHH = part.Parent:FindFirstChildOfClass("Humanoid")
  1048. HHH.Health = HHH.MaxHealth
  1049. so("260421433", HTorso,1.5, 1)
  1050.  
  1051. elseif RandomEffect == 2 then
  1052. so("260421433", HTorso,1.5, 1)
  1053. wait(1.5)
  1054. HC.Parent = workspace
  1055. HC.CanCollide = false
  1056. HC.Transparency = 1
  1057. HC.Anchored=true
  1058. game:GetService("Debris"):AddItem(HC, 3)
  1059. so("1597566679", HTorso,3, 0.75)
  1060. local HHH = part.Parent:FindFirstChildOfClass("Humanoid")
  1061. coroutine.resume(coroutine.create(function()
  1062. TheGunHandle:Destroy()
  1063. for i=1,20 do wait(.15)
  1064. HHH.Health = HHH.Health - 5
  1065. end
  1066. wait(.25)
  1067. so("463770058", Torso,5, 1)
  1068. for i=1,5 do
  1069. idleAnim = 1
  1070. idletime = 0
  1071. so("387927244", HTorso,3, 1)
  1072. wait(0.25) end
  1073. end))
  1074.  
  1075. elseif RandomEffect == 3 then
  1076. so("260421433", HTorso,1.5, 1)
  1077. wait(1.5)
  1078. HC.Parent = workspace
  1079. HC.CanCollide = false
  1080. HC.Transparency = 1
  1081. HC.Anchored=true
  1082. game:GetService("Debris"):AddItem(HC, 3)
  1083. so("131314452", HTorso,3, 1)
  1084. local v = Instance.new("BodyVelocity",HTorso)
  1085. v.Velocity = HTorso.CFrame.upVector * 45 v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  1086. local HHH = part.Parent:FindFirstChildOfClass("Humanoid")
  1087. coroutine.resume(coroutine.create(function()
  1088. TheGunHandle:Destroy()
  1089. wait(0.25)
  1090. v:Destroy()
  1091. wait(0.6)
  1092. HHH.Health = 0
  1093. so("1561246147", HTorso,10, 1.1)
  1094. wait(1)
  1095. so("2148986081", Torso,10, 0.95)
  1096.  
  1097. for i=1,2 do
  1098. idleAnim = 2
  1099. idletime = 0
  1100. wait(0.5)
  1101. end
  1102.  
  1103. end))
  1104.  
  1105. elseif RandomEffect == 4 then
  1106. coroutine.resume(coroutine.create(function()
  1107. TheGunHandle:Destroy()
  1108. end))
  1109.  
  1110. so("1460707372", HTorso,1.5, 1.3)
  1111. local HHH = part.Parent:FindFirstChildOfClass("Humanoid")
  1112. HHH.PlatformStand = true
  1113. HHH.Health = HHH.Health - HHH.MaxHealth/10
  1114. local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(math.huge, math.huge, math.huge), angularvelocity = HTorso.CFrame.lookVector*3, Parent = HTorso})
  1115.  
  1116. game:GetService("Debris"):AddItem(rl, .2)
  1117.  
  1118. wait(1.6)
  1119. HHH.PlatformStand = false
  1120. elseif RandomEffect == 5 then
  1121. wait(.5)
  1122. wait(.8)
  1123. coroutine.resume(coroutine.create(function()
  1124. part.Parent:BreakJoints()
  1125. part.Parent.Parent = nil
  1126. part.Parent:Destroy()
  1127. end))
  1128. swait()
  1129. TheGunHandle.Parent = workspace
  1130. so("138093019", TheGunHandle,1.5, 1)
  1131.  
  1132. wait(2)
  1133. so("525166232", TheGunHandle,1.5, 1)
  1134. game:GetService("Debris"):AddItem(TheGunHandle, 1.5)
  1135. elseif RandomEffect == 6 then
  1136. so("425191758", HTorso,1.5, 1)
  1137. wait(1.35)
  1138. HC.Parent = workspace
  1139. HC.CanCollide = false
  1140. HC.Transparency = 1
  1141. HC.Anchored=true
  1142. game:GetService("Debris"):AddItem(HC, 3)
  1143. so("633129949", HC,3, 1.5)
  1144. local EX = Instance.new("Explosion", workspace)
  1145.  
  1146. EX.Position = HTorso.Position
  1147. EX.BlastPressure = 100000
  1148. EX.BlastRadius = 2
  1149. HTorso:Destroy()
  1150. coroutine.resume(coroutine.create(function()
  1151. TheGunHandle:Destroy()
  1152. end))
  1153.  
  1154. end
  1155.  
  1156. end
  1157.  
  1158. end
  1159. end
  1160. end
  1161.  
  1162.  
  1163.  
  1164. TheGunHandle.Touched:connect(onTouch)
  1165.  
  1166.  
  1167. game:GetService("Debris"):AddItem(TheGunHandle, 60*5)
  1168.  
  1169. coroutine.resume(coroutine.create(function()
  1170. SWeld:Destroy()
  1171. end))
  1172. for i = 0,1,.1 do swait()
  1173. Humanoid.WalkSpeed = 12
  1174. Humanoid.JumpPower = 60
  1175.  
  1176. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(70)), .15)
  1177. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-70 - 0 * math.cos(sine / 8/3))), .15)
  1178. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(0 + 0 * math.cos(sine / 8))), 0.15)
  1179. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-0 - 0 * math.cos(sine / 8))), 0.15)
  1180. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1181. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1182.  
  1183.  
  1184.  
  1185.  
  1186. end
  1187.  
  1188.  
  1189.  
  1190. attack = false
  1191. end
  1192. function Attack3()
  1193. attack = true
  1194.  
  1195. so("132026302", HTorso,2.0, 1.0)
  1196. for i = 0,5,.1 do swait()
  1197. Humanoid.WalkSpeed = 12
  1198. Humanoid.JumpPower = 60
  1199.  
  1200. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1201. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  1202. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  1203. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  1204. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1205. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1206.  
  1207.  
  1208.  
  1209.  
  1210. end
  1211. HTorso=nil
  1212. local TheGunHandle = Instance.new("Part")
  1213. TheGunHandle.Reflectance = 0
  1214. TheGunHandle.Transparency = 1
  1215. TheGunHandle.CanCollide = false
  1216. TheGunHandle.Locked = true
  1217. TheGunHandle.Anchored=false
  1218. TheGunHandle.BrickColor = BrickColor.new("Really blue")
  1219. TheGunHandle.Name = "BHandle"
  1220. TheGunHandle.Size = Head.Size*2
  1221. TheGunHandle.Material = "SmoothPlastic"
  1222. TheGunHandle:BreakJoints()
  1223. TheGunHandle.Parent = Character
  1224. TheGunHandle.CFrame = Head.CFrame
  1225. local SWeld=weld(TheGunHandle,Head,TheGunHandle,cf(0,0,0))
  1226. local function onTouch(part)
  1227. if part.Parent ~= Character and part.Parent.Parent ~= Character then
  1228. if part.Parent:FindFirstChildOfClass("Humanoid") then
  1229.  
  1230. local EX = Instance.new("Explosion", workspace)
  1231.  
  1232. EX.Position = Head.Position
  1233. EX.BlastPressure = 0
  1234. EX.BlastRadius = 0
  1235.  
  1236. coroutine.resume(coroutine.create(function()
  1237. part.Parent:BreakJoints()
  1238. part.Parent.Parent = nil
  1239. part.Parent:Destroy()
  1240. end))
  1241.  
  1242.  
  1243. end
  1244. end
  1245. end
  1246.  
  1247.  
  1248.  
  1249. TheGunHandle.Touched:connect(onTouch)
  1250. coroutine.resume(coroutine.create(function()
  1251. while TheGunHandle.Parent ~= nil do
  1252. so("132026314", HTorso,1.5, 1.0)
  1253. wait(.25)
  1254. end
  1255.  
  1256. end))
  1257.  
  1258. for i = 0,25,.1 do swait()
  1259. Humanoid.WalkSpeed = 64
  1260. Humanoid.JumpPower = 60
  1261.  
  1262. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(math.random(-40,40)/10, math.random(-40,40)/10, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(10+math.random(-40,40) - 0 * math.cos(sine / 8)), math.rad((math.random(-40,40) + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1263. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  1264. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  1265. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  1266. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1267. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1268.  
  1269.  
  1270.  
  1271.  
  1272. end
  1273. coroutine.resume(coroutine.create(function()
  1274. TheGunHandle:Destroy()
  1275. end))
  1276. so("864152455", HTorso,3.0, 1.25)
  1277. for i = 0,9,.025 do swait()
  1278. Humanoid.WalkSpeed = 0
  1279. Humanoid.JumpPower = 0
  1280.  
  1281. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -2.5 + 0.0 * math.cos(sine / 8)) * angles(math.rad(90 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1282. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  1283. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  1284. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  1285. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1286. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1287.  
  1288.  
  1289.  
  1290.  
  1291. end
  1292. so("131552951", HTorso,2.0, 1)
  1293. attack = false
  1294. end
  1295. function Attack4()
  1296. attack = true
  1297.  
  1298.  
  1299.  
  1300.  
  1301. attack = false
  1302. end
  1303.  
  1304.  
  1305.  
  1306.  
  1307. function JumpAfterEffect()
  1308. if attack == false then
  1309. attack = true
  1310.  
  1311.  
  1312.  
  1313. if sprintmode == true then
  1314. Humanoid.WalkSpeed= 10
  1315. else
  1316. Humanoid.WalkSpeed= 3
  1317. end
  1318. Humanoid.JumpPower= 0
  1319. coroutine.resume(coroutine.create(function()
  1320. local NewParticle = Particle1:Clone()
  1321.  
  1322.  
  1323. local EffectFloor,PosFloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1324.  
  1325. local EffectHolder = Instance.new("Part")
  1326. EffectHolder.Parent = Character
  1327. EffectHolder.Size = Vector3.new(0.05, 0.05, 0.05)
  1328. EffectHolder.Transparency = 1
  1329. EffectHolder.Anchored=true
  1330.  
  1331. EffectHolder.Material = "Neon"
  1332. EffectHolder.CanCollide = false
  1333.  
  1334.  
  1335. EffectHolder.CFrame = cn(PosFloor)
  1336.  
  1337. NewParticle.Color = ColorSequence.new(EffectFloor.Color, Color3.new (.5, .5, .5))
  1338. NewParticle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,EffectFloor.Transparency+.3),NumberSequenceKeypoint.new(.5,EffectFloor.Transparency+.8),NumberSequenceKeypoint.new(1,1)})
  1339. NewParticle.Parent = EffectHolder
  1340. NewParticle:Emit(30)
  1341. so("1161221108", EffectHolder,.7, math.random(100,120)/100)
  1342. game:GetService("Debris"):AddItem(EffectHolder, 3)
  1343.  
  1344.  
  1345. end))
  1346.  
  1347. for i = 1,2.4,.1 do
  1348. swait()
  1349. Neck.C0 = Neck.C0:lerp(NeckCF*CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(25-3 * math.cos(sine / 15)),math.rad(0),math.rad(0)),.1)
  1350. RJ.C0 = RJ.C0:lerp(RootCF*CFrame.new(0, .3, -.6 +-.05 * math.cos(sine / 15.5)) * CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  1351. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.60, -.0) * angles(math.rad(20 - 2 * math.cos(sine / 8)), math.rad(0), math.rad(15 + 0 * math.cos(sine / 8))), 0.1)
  1352. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(20 - 2 * math.cos(sine / 8)), math.rad(0), math.rad(-15 - 2 * math.cos(sine / 8))), 0.1)
  1353. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.65+ .05 * math.cos(sine / 15), -.2) * CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)),.2)
  1354. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.65+ .05 * math.cos(sine / 15), -.2) * CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)),.2)
  1355. end
  1356.  
  1357.  
  1358. attack = false
  1359. end
  1360. end
  1361.  
  1362.  
  1363. Mouse.KeyDown:Connect(function(key)
  1364. if key == "f" and attack == false then
  1365. Attack1()
  1366. end
  1367. if key == "g" and attack == false then
  1368. Attack2()
  1369. end
  1370.  
  1371. if key == "h" and attack == false then
  1372. Attack3()
  1373. end
  1374. if key == "j" and attack == false then
  1375. Attack4()
  1376. end
  1377.  
  1378.  
  1379.  
  1380.  
  1381. if key == "z" and attack == false then
  1382. ChangeCookie()
  1383. end
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389. if key == "m" then
  1390.  
  1391. if playsong == true then
  1392. playsong = false
  1393. s2:stop()
  1394. elseif playsong == false then
  1395. playsong = true
  1396.  
  1397.  
  1398. s2:play()
  1399. end
  1400.  
  1401. end
  1402.  
  1403.  
  1404.  
  1405. if key == "n" then
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412. CurId = CurId + 1
  1413. if CurId > 7 then
  1414. CurId = 1
  1415.  
  1416. end
  1417. if CurId == 1 then
  1418. lastid= "http://www.roblox.com/asset/?id=762141368"
  1419. warn('Music1')
  1420.  
  1421.  
  1422. elseif CurId == 2 then
  1423. lastid= "http://www.roblox.com/asset/?id=1526833227"
  1424. warn('Music2')
  1425.  
  1426. elseif CurId == 3 then
  1427. lastid= "http://www.roblox.com/asset/?id=972495527"
  1428. warn('Music3')
  1429.  
  1430. elseif CurId == 4 then
  1431. lastid= "http://www.roblox.com/asset/?id=2738012216"
  1432. warn('Music4')
  1433.  
  1434. elseif CurId == 5 then
  1435. lastid= "http://www.roblox.com/asset/?id=1856178072"
  1436. warn('Music5')
  1437.  
  1438. elseif CurId == 6 then
  1439. lastid= "http://www.roblox.com/asset/?id=2705508118"
  1440. warn('Music6')
  1441.  
  1442. elseif CurId == 7 then
  1443. lastid= "http://www.roblox.com/asset/?id=565858615"
  1444. warn('Music7')
  1445.  
  1446. end
  1447.  
  1448.  
  1449. lastsongpos = 0
  1450. s2.TimePosition = lastsongpos
  1451.  
  1452.  
  1453. end
  1454.  
  1455.  
  1456. end)
  1457. coroutine.resume(coroutine.create(function()
  1458. while Humanoid.Health>0 do
  1459. swait()
  1460. sine = sine + change
  1461. hitfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1462.  
  1463.  
  1464. coroutine.resume(coroutine.create(function()
  1465.  
  1466.  
  1467. if s2.Parent == nil or s2 == nil then
  1468.  
  1469. s2 = s2c:Clone()
  1470. s2.Parent = Torso
  1471. s2.Name = "BGMusic"
  1472. -- s2.SoundId = lastid
  1473. s2.Pitch = 1
  1474. s2.Volume = 1.5
  1475. s2.Looped = true
  1476. s2.archivable = false
  1477. s2.TimePosition = lastsongpos
  1478. if playsong == true then
  1479. s2:play()
  1480. elseif playsong == false then
  1481. s2:stop()
  1482. end
  1483.  
  1484.  
  1485. else
  1486. lastsongpos=s2.TimePosition
  1487. s2.Pitch = 1
  1488.  
  1489. s2.Volume = 1.5
  1490.  
  1491. s2.Looped = true
  1492. s2.SoundId = lastid
  1493. s2.EmitterSize = 30
  1494. end
  1495.  
  1496.  
  1497.  
  1498. end))
  1499.  
  1500.  
  1501. if hitfloor ~= nil then
  1502. inAir = true
  1503. else
  1504. inAir = false
  1505. end
  1506.  
  1507. if inAir == true then
  1508. if inAir2 == false then
  1509.  
  1510.  
  1511. JumpAfterEffect()
  1512.  
  1513. end
  1514. end
  1515.  
  1516. if hitfloor ~= nil then
  1517. inAir2 = true
  1518. else
  1519. inAir2 = false
  1520. end
  1521.  
  1522.  
  1523.  
  1524.  
  1525. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1526. local velderp = RootPart.Velocity.y
  1527.  
  1528.  
  1529.  
  1530. local wasnotidle = false
  1531.  
  1532. if Anim ~= "Idle" then
  1533. wasnotidle = true
  1534. end
  1535.  
  1536.  
  1537. inairvel=torvel
  1538.  
  1539.  
  1540. if inairvel > 30 then
  1541. inairvel=30
  1542. end
  1543. inairvel=inairvel/50
  1544. if RootPart.Velocity.y > 1 and hitfloor == nil then
  1545. Anim = "Jump"
  1546. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  1547. Anim = "Fall"
  1548. elseif Humanoid.Sit == true then
  1549. Anim = "Sit"
  1550. elseif torvel < 1 and hitfloor ~= nil then
  1551. Anim = "Idle"
  1552. elseif torvel > 2 and hitfloor ~= nil then
  1553. if sprintmode == true then
  1554. Anim = "Run"
  1555. else
  1556. Anim = "Walk"
  1557. end
  1558. else
  1559. Anim = ""
  1560.  
  1561. end
  1562.  
  1563.  
  1564. if attack == false then
  1565. if Anim == "Walk" then
  1566.  
  1567.  
  1568. if hitfloor ~= nil then
  1569. nextstep = math.cos(sine / 8)
  1570.  
  1571. if nextstep > -0.1 and nextstep < 0.1 and CanUseWalkSound == true then
  1572. CanUseWalkSound = false
  1573. local MaterialName = hitfloor.Material.Name
  1574.  
  1575. if MaterialName =="Plastic"or MaterialName =="SmoothPlastic"then
  1576. so("379483672", Torso,.5, math.random(30,60)/100)
  1577.  
  1578. elseif MaterialName =="Pebble"then
  1579. so("267882971", Torso,.5, math.random(80,100)/100)
  1580.  
  1581. elseif MaterialName =="Marble"or MaterialName =="Granite"then
  1582. so("379483672", Torso,.5, math.random(80,100)/100)
  1583.  
  1584.  
  1585. elseif MaterialName =="Grass"then
  1586. so("267882764", Torso,.35, math.random(90,100)/100)
  1587.  
  1588. elseif MaterialName =="Ice"then
  1589. so("265653271", Torso,.8, math.random(70,90)/100)
  1590.  
  1591. elseif MaterialName =="Foil"then
  1592. so("265653271", Torso,.5, math.random(40,60)/100)
  1593.  
  1594.  
  1595.  
  1596. elseif MaterialName =="Concrete"or MaterialName =="Slate"or MaterialName =="Brick" then
  1597. so("267454199", Torso,.5, math.random(80,100)/100)
  1598.  
  1599.  
  1600.  
  1601. elseif MaterialName =="Wood" or MaterialName =="WoodPlanks"then
  1602. so("267454275", Torso,.5, math.random(80,100)/100)
  1603.  
  1604. elseif MaterialName =="Sand" then
  1605. so("265653329", Torso,.5, math.random(80,100)/100)
  1606.  
  1607. elseif MaterialName =="CorrodedMetal"or MaterialName =="Metal" or MaterialName =="DiamondPlate" then
  1608. so("267882776", Torso,.5, math.random(80,100)/100)
  1609.  
  1610. elseif MaterialName =="Neon" or hitfloor.Transparency >0.1 then
  1611. so("145180170", Torso,.5, math.random(80,100)/100)
  1612.  
  1613.  
  1614. end
  1615. --nextstep = Humanoid.WalkSpeed
  1616.  
  1617.  
  1618. coroutine.resume(coroutine.create(function()
  1619. wait(.2)
  1620. CanUseWalkSound = true
  1621. end))
  1622.  
  1623.  
  1624. else
  1625. -- nextstep = nextstep - 1
  1626.  
  1627. end
  1628.  
  1629.  
  1630.  
  1631. end
  1632.  
  1633.  
  1634.  
  1635. end
  1636. end
  1637.  
  1638. if Anim == "Idle" then
  1639. idletime = idletime + 1
  1640. else
  1641. if idleAnim == 0 then
  1642. idletime = 0 end
  1643. end
  1644. if idleAnim == 0 and idletime > idletimeM then
  1645. idleAnim =math.random(0,5)
  1646. idletime = 0
  1647.  
  1648. idletimeM = math.random(100,600)
  1649. end
  1650.  
  1651.  
  1652.  
  1653. if wasnotidle == true then
  1654. if Anim == "Idle" then
  1655. idletime = 40
  1656. else
  1657. idletime = 0
  1658. end
  1659. end
  1660.  
  1661.  
  1662.  
  1663. if attack == false then
  1664. if Anim == "Jump" then
  1665.  
  1666.  
  1667. change = 0.5
  1668. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0 + (0.0395/2) * math.cos(sine / 8), -0.1 + 0.0395 * math.cos(sine / 8)) * angles(math.rad(-90.5 - 1.5 * math.cos(sine / 8))+inairvel/2, math.rad(0), math.rad(0)), .10)
  1669. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1670. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 5 * math.cos(sine / 8))), 0.1)
  1671. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 5 * math.cos(sine / 8))), 0.1)
  1672. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1673. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1674. elseif Anim == "Fall" then
  1675.  
  1676.  
  1677. change = 0.5
  1678. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0 + (0.0395/2) * math.cos(sine / 8), -0.1 + 0.0395 * math.cos(sine / 8)) * angles(math.rad(90 - 1.5 * math.cos(sine / 8))-inairvel, math.rad(0), math.rad(0)), .10)
  1679. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1680. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 5 * math.cos(sine / 8))), 0.1)
  1681. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 5 * math.cos(sine / 8))), 0.1)
  1682. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1683. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1684.  
  1685. elseif Anim == "Idle" then
  1686.  
  1687. Humanoid.WalkSpeed = 12
  1688. Humanoid.JumpPower = 60
  1689. if idleAnim == 0 then
  1690. change = 0.6
  1691.  
  1692. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1693. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1694. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(0 - 5 * math.cos(sine / 8)), math.rad(0), math.rad(5 + 5 * math.cos(sine / 8))), 0.1)
  1695. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(0 - 5 * math.cos(sine / 8)), math.rad(-0), math.rad(-5 - 5 * math.cos(sine / 8))), 0.1)
  1696. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1697. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1698.  
  1699. elseif idleAnim == 1 then
  1700. change = 0.6
  1701.  
  1702. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(math.random(-10,10)/100, math.random(-10,10)/100, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(20)), .8)
  1703. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(13.5 - 0.5 * math.cos(sine / 8)), math.rad(-10), math.rad(-20 - 3.5 * math.cos(sine / 8/3))), .8)
  1704. RW.C0 = clerp(RW.C0, CFrame.new(1.3 , 0.6, -.2) * angles(math.rad(1 - 0.5 * math.cos(sine / 8)), math.rad(-27), math.rad(-105 + 0.5 * math.cos(sine / 8))), 0.8)
  1705. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 0.5 * math.cos(sine / 8)), math.rad(-7), math.rad(-110 - 0.5 * math.cos(sine / 8))), 0.8)
  1706. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.8)
  1707. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.8)
  1708. if idletime > 10 then
  1709. idleAnim =0
  1710. idletime = 0
  1711. change = 0.6
  1712.  
  1713. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), 1)
  1714. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), 1)
  1715. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.5, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(7), math.rad(5 + 5 * math.cos(sine / 8))), .6)
  1716. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.0) * angles(math.rad(1 - 5 * math.cos(sine / 8)), math.rad(-7), math.rad(-5 - 5 * math.cos(sine / 8))), .6)
  1717. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),1)
  1718. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),1)
  1719.  
  1720.  
  1721.  
  1722.  
  1723. end
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729. elseif idleAnim == 2 then
  1730. change = 0.6
  1731.  
  1732.  
  1733.  
  1734. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((idletime*10 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1735. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1736. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 0 * math.cos(sine / 8))), 0.1)
  1737. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 0 * math.cos(sine / 8))), 0.1)
  1738. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1739. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1740.  
  1741.  
  1742.  
  1743. if idletime > 36 then
  1744. idleAnim =0
  1745. idletime = 0
  1746.  
  1747.  
  1748. end
  1749.  
  1750.  
  1751.  
  1752. elseif idleAnim == 3 then
  1753. change = 0.6
  1754.  
  1755.  
  1756.  
  1757. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((-idletime*10 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1758. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1759. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 0 * math.cos(sine / 8))), 0.1)
  1760. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 0 * math.cos(sine / 8))), 0.1)
  1761. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1762. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1763.  
  1764.  
  1765.  
  1766. if idletime > 36 then
  1767. idleAnim =0
  1768. idletime = 0
  1769.  
  1770.  
  1771. end
  1772.  
  1773. elseif idleAnim == 4 then
  1774. change = 0.6
  1775.  
  1776.  
  1777.  
  1778. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(idletime*10 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1779. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1780. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 0 * math.cos(sine / 8))), 0.1)
  1781. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 0 * math.cos(sine / 8))), 0.1)
  1782. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1783. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1784.  
  1785.  
  1786.  
  1787. if idletime > 36 then
  1788. idleAnim =0
  1789. idletime = 0
  1790.  
  1791.  
  1792. end
  1793. elseif idleAnim == 5 then
  1794. change = 0.6
  1795.  
  1796.  
  1797.  
  1798. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.1 * math.cos(sine / 8)) * angles(math.rad(-idletime*10 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1799. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 3.5 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 3.5 * math.cos(sine / 8/3))), .15)
  1800. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(7), math.rad(90 + 0 * math.cos(sine / 8))), 0.1)
  1801. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(1 - 0 * math.cos(sine / 8)), math.rad(-7), math.rad(-90 - 0 * math.cos(sine / 8))), 0.1)
  1802. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1803. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- .1 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1804.  
  1805.  
  1806.  
  1807. if idletime > 36 then
  1808. idleAnim =0
  1809. idletime = 0
  1810.  
  1811.  
  1812. end
  1813.  
  1814. end
  1815.  
  1816.  
  1817. elseif Anim == "Walk" then
  1818.  
  1819.  
  1820. change = 1.5
  1821. Humanoid.WalkSpeed = 26
  1822. Humanoid.JumpPower = 60
  1823. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0,-0.05 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7, -0.3 + 0.3 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7) * angles(math.rad(-25 - 13 * math.cos(sine / 3.5)),math.rad(2 * math.cos(sine / 7)) + RootPart.RotVelocity.Y / 70, math.rad(8 * math.cos(sine / 7))), 0.2)
  1824. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.new(0, 0, 0 + 0.02 * math.cos(sine / 3.5)) * angles(math.rad(-10 + 3.5 * math.cos(sine / 3.5)), math.rad(0 - 0 * math.cos(sine / 3.5)), math.rad(-8 * math.cos(sine / 7)) + RootPart.RotVelocity.Y / 16), 0.2)
  1825. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, -.0) * angles(math.rad(-10.5 * math.cos(sine / 7*2)) ,math.rad(-70-5 * math.cos(sine / 7)), math.rad(80) - RootPart.RotVelocity.Y / 90), 0.2)
  1826. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, -.0) * angles(math.rad(-10.5 * math.cos(sine / 7*2)),math.rad(70-5 * math.cos(sine / 7)), math.rad(-80) - RootPart.RotVelocity.Y / 90), 0.2)
  1827. RH.C0 = RH.C0:lerp( cf(.5, -0.625 - 1 * math.cos(sine / 7) / 2,-0.1+ 0.5 * math.cos(sine / 7) / 2) * CFrame.Angles(math.rad(-26.5 - 80 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 10 * math.cos(sine / 7)), math.rad(0)) * CFrame.Angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(-90) + RootPart.RotVelocity.Y / 50, math.rad(1 * math.cos(sine / 7))), 0.2)
  1828. LH.C0 = LH.C0:lerp( cf(-.5, -0.625 + 1 * math.cos(sine / 7) / 2,-0.1+ -0.5 * math.cos(sine / 7) / 2) * CFrame.Angles(math.rad(-26.5 + 80 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 10 * math.cos(sine / 7)), math.rad(0)) * CFrame.Angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(90) + RootPart.RotVelocity.Y / 50, math.rad(1 * math.cos(sine / 7))), 0.2)
  1829.  
  1830. else
  1831. Humanoid.WalkSpeed = 12
  1832. Humanoid.JumpPower = 60
  1833.  
  1834. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.15 + 0.0 * math.cos(sine / 8)) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad((0 + 0* math.cos(sine / 8)/20)), math.rad(0)), .15)
  1835. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(3.5 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(-0 - 0 * math.cos(sine / 8/3))), .15)
  1836. RW.C0 = clerp(RW.C0, CFrame.new(1.5 , 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(0), math.rad(90 + 0 * math.cos(sine / 8))), 0.15)
  1837. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.0) * angles(math.rad(0 - 0 * math.cos(sine / 8)), math.rad(-0), math.rad(-90 - 0 * math.cos(sine / 8))), 0.15)
  1838. RH.C0 = RH.C0:lerp(CFrame.new(.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(2.5- 0.0 * math.cos(sine / 8))),.15)
  1839. LH.C0 = LH.C0:lerp(CFrame.new(-.5, -0.90- 0.0 * math.cos(sine / 8), 0) * CFrame.Angles(math.rad(1.5 - 0 * math.cos(sine / 8)),math.rad(0),math.rad(-2.5- 0.0 * math.cos(sine / 8))),.15)
  1840.  
  1841.  
  1842.  
  1843.  
  1844. end
  1845. end
  1846. end
  1847. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement