Advertisement
lafur

Untitled

Jun 29th, 2020
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plr = owner
  2. char = plr.Character
  3. ra = char["Right Arm"]
  4. la = char["Left Arm"]
  5. rl = char["Right Leg"]
  6. ll = char["Left Leg"]
  7. hed = char.Head
  8. root = char.HumanoidRootPart
  9. hum = char.Humanoid
  10. dancin = false
  11.  
  12. clerp = function(toclerp, cf, number)
  13. local joint = toclerp
  14. joint.C0 = joint.C0:Lerp(cf, number)
  15. end
  16.  
  17. clerp2 = function(toclerp, cf)
  18. local joint = toclerp
  19. joint.C0 = cf
  20. end
  21.  
  22. clerp3 = function(toclerp, cf, number)
  23. local joint = toclerp
  24. joint.C1 = joint.C1:Lerp(cf, number)
  25. end
  26.  
  27. Swait,swait = function(number)
  28. if number == 0 or number == nil then
  29. game:GetService("RunService").Heartbeat:Wait()
  30. else
  31. for i = 1,number do
  32. game:GetService("RunService").Heartbeat:Wait()
  33. end
  34. end
  35. end
  36.  
  37. ezweld = function(p, a, b, cf)
  38. local weld = Instance.new("Weld",p)
  39. weld.Part0 = a
  40. weld.Part1 = b
  41. weld.C0 = cf
  42. return weld
  43. end
  44.  
  45. NewSound = function(p, id, pit, vol, loop)
  46. local Sound = Instance.new("Sound",p)
  47. Sound.Pitch = pit
  48. Sound.Volume = vol
  49. Sound.SoundId = "rbxassetid://" ..id
  50. Sound.Looped = loop
  51. Sound:Play()
  52. return Sound
  53. end
  54.  
  55. IT = Instance.new
  56. Rad = math.rad
  57. Cos = math.cos
  58. Sin = math.sin
  59. BrickC = BrickColor.new
  60. C3 = Color3.new
  61. VT = Vector3.new
  62.  
  63. anim = "Idle"
  64. attack = false
  65. local RS = char.Torso["Right Shoulder"]
  66. local LS = char.Torso["Left Shoulder"]
  67. local RH = char.Torso["Right Hip"]
  68. local LH = char.Torso["Left Hip"]
  69. local neck = char.Torso["Neck"]
  70. local root = char.HumanoidRootPart
  71. local rootj = root.RootJoint
  72. local sine = 0
  73. local RSnor = RS.C0
  74. local LSnor = LS.C0
  75. local RHnor = RH.C0
  76. local LHnor = LH.C0
  77. local RSnor2 = RS.C1
  78. local LSnor2 = LS.C1
  79. local RHnor2 = RH.C1
  80. local LHnor2 = LH.C1
  81. local rootjnor = rootj.C0
  82. local necknor = neck.C0
  83. local rootjnor2 = rootj.C1
  84. local necknor2 = neck.C1
  85. local tors = char.Torso
  86. hum.Animator:remove()
  87. mouse = plr:GetMouse()
  88. hold = false
  89. Debris = game:GetService("Debris")
  90.  
  91. sped = 16
  92. keyhold = false
  93. spino = 0
  94. hito = true
  95.  
  96. SetTween = function(SPart,CFr,MoveStyle2,outorin2,AnimTime)
  97. local MoveStyle = Enum.EasingStyle[MoveStyle2]
  98. local outorin = Enum.EasingDirection[outorin2]
  99.  
  100.  
  101. local dahspeed=1
  102.  
  103. if SPart.Name=="Bullet" then
  104. dahspeed=1
  105. end
  106.  
  107. local tweeningInformation = TweenInfo.new(
  108. AnimTime/dahspeed,
  109. MoveStyle,
  110. outorin,
  111. 0,
  112. false,
  113. 0
  114. )
  115. local MoveCF = CFr
  116. local tweenanim = game:service("TweenService"):Create(SPart,tweeningInformation,MoveCF)
  117. tweenanim:Play()
  118. end
  119.  
  120. function RayCast(Position, Direction, Range, Ignore)
  121. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  122. end
  123.  
  124. local moo = Instance.new("Model")
  125. local fun = Instance.new("Part", moo)
  126. fun.Name = "coolepicdust"
  127. fun.Material = "SmoothPlastic"
  128. fun.CanCollide = false
  129. fun.Color = Color3.new(1, 1, 1)
  130. fun.Size = Vector3.new(1, 1, 1)
  131. fun.Rotation = Vector3.new(math.random(-180, 180), math.random(-180, 180), math.random(-180, 180))
  132. local md = true
  133.  
  134. beannumber = 1
  135.  
  136. local hoot = NewSound(hed, 1060413310, 1, 10, false)
  137. hoot:Stop()
  138.  
  139. spid = "fast"
  140.  
  141. sizo = 1
  142. local part = Instance.new("Part",char)
  143. part.Size = Vector3.new(0.1, 0.1, 0.1)
  144. part.CanCollide = false
  145. local mesh = Instance.new("SpecialMesh",part)
  146. mesh.MeshId = "rbxassetid://4890019846"
  147. mesh.TextureId = "rbxassetid://4890019889"
  148. mesh.Scale = Vector3.new(1, 1, 1)*sizo
  149. mesh.Offset = Vector3.new(0, 0, 0)
  150. local weld = ezweld(char, part, tors, CFrame.new(0, -0.25, 0.65) * CFrame.Angles(0, Rad(180), 0))
  151.  
  152. rut = root
  153. animspeed = .1
  154.  
  155. script.Parent = workspace
  156.  
  157. local nom = NewSound(nil, 1278031541, 1, 7, false)
  158. nom:Stop()
  159.  
  160. function cookie()
  161. attack = true
  162. for i = 1,15 do
  163. Swait()
  164. clerp(rootj,rootjnor*CFrame.new(0, 0, -0.1+0.05 * Sin(sine / 18.5))*CFrame.Angles(0, Rad(0 * Sin(sine / (18.5*2))), Rad(-2)), 0.15)
  165. clerp(neck, necknor*CFrame.Angles(Rad(-2 * Sin(sine / 18.5)), 0, Rad(3)), 0.15)
  166. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(33 + 1 * Sin(sine / (18.5))), Rad(0), Rad(-21)), 0.3)
  167. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-4 + 3 * Sin(sine / (18.5))), Rad(0), Rad(0)), 0.3)
  168. clerp(RH, RHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))-Rad(0 * Sin(sine / (18.5*2))), Rad(-6), Rad(0)), 0.15)
  169. clerp(LH, LHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))+Rad(0 * Sin(sine / (18.5*2))), Rad(6), Rad(0)), 0.15)
  170. end
  171. for i = 1,6 do
  172. Swait()
  173. clerp(rootj,rootjnor*CFrame.new(0, 0, -0.1+0.05 * Sin(sine / 18.5))*CFrame.Angles(0, Rad(0 * Sin(sine / (18.5*2))), Rad(-2)), 0.05)
  174. clerp(neck, necknor*CFrame.Angles(Rad(-2 * Sin(sine / 18.5)), 0, Rad(3)), 0.05)
  175. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(140)), 0.05)
  176. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-4 + 3 * Sin(sine / (18.5))), Rad(0), Rad(0)), 0.05)
  177. clerp(RH, RHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))-Rad(0 * Sin(sine / (18.5*2))), Rad(-6), Rad(0)), 0.05)
  178. clerp(LH, LHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))+Rad(0 * Sin(sine / (18.5*2))), Rad(6), Rad(0)), 0.05)
  179. end
  180. local cokie = Instance.new("Part", script)
  181. cokie.Size = Vector3.new(2.5, 0.25, 2.5)
  182. cokie.CFrame = ra.CFrame * CFrame.new(0, 1, 0) * CFrame.Angles(0, 0, Rad(90))
  183. cokie.Velocity = cokie.CFrame.lookVector * 35 + Vector3.new(0, 11, 0)
  184. local mesh = Instance.new("SpecialMesh", cokie)
  185. mesh.MeshId = "rbxassetid://4866593097"
  186. mesh.TextureId = "rbxassetid://4866593127"
  187. mesh.Scale = Vector3.new(2, 1, 2)
  188. coroutine.wrap(function()
  189. wait(.65)
  190. cokie.Touched:connect(function(hit)
  191. local dud = hit.Parent
  192. if dud and dud ~= workspace then
  193. for i,v in pairs (dud:children()) do
  194. if v:IsA("Humanoid") then
  195. cokie:Destroy()
  196. v.Health = v.Health + 25
  197. nom.Parent = hit
  198. nom:Play()
  199. coroutine.wrap(function()
  200. wait(2.15)
  201. nom.Parent = nil
  202. nom:Stop()
  203. end)()
  204. end
  205. end
  206. end
  207. end)
  208. end)()
  209. Debris:AddItem(cokie, 11)
  210. for i = 1,8 do
  211. Swait()
  212. clerp(rootj,rootjnor*CFrame.new(0, 0, -0.1+0.05 * Sin(sine / 18.5))*CFrame.Angles(0, Rad(0 * Sin(sine / (18.5*2))), Rad(-2)), 0.15)
  213. clerp(neck, necknor*CFrame.Angles(Rad(-2 * Sin(sine / 18.5)), 0, Rad(3)), 0.15)
  214. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(90)), 0.3)
  215. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-4 + 3 * Sin(sine / (18.5))), Rad(0), Rad(0)), 0.3)
  216. clerp(RH, RHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))-Rad(0 * Sin(sine / (18.5*2))), Rad(-6), Rad(0)), 0.15)
  217. clerp(LH, LHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))+Rad(0 * Sin(sine / (18.5*2))), Rad(6), Rad(0)), 0.15)
  218. end
  219. attack = false
  220. end
  221.  
  222. mouse.Button1Down:connect(function()
  223. if attack == false then
  224. cookie()
  225. end
  226. end)
  227.  
  228. while true do
  229. Swait()
  230. sine = sine + 1
  231. local TiltVelocity = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity/1.6))
  232. local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
  233. local WALKSPEEDVALUE = 8 / (sped / 16)
  234. torsverticalvel = root.Velocity.y
  235. hitfloor = RayCast(root.Position, (CFrame.new(root.Position, root.Position + Vector3.new(0, -1, 0))).lookVector, tors.Size.y+2+hum.HipHeight, char)
  236. if TORSOVELOCITY < 1 and hitfloor ~= nil then
  237. anim = "Idle"
  238. if attack == false then
  239. clerp(rootj,rootjnor*CFrame.new(0, 0, -0.1+0.05 * Sin(sine / 18.5))*CFrame.Angles(0, Rad(0 * Sin(sine / (18.5*2))), Rad(-2)), 0.15)
  240. clerp(neck, necknor*CFrame.Angles(Rad(-2 * Sin(sine / 18.5)), 0, Rad(3)), 0.15)
  241. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-4 + 3 * Sin(sine / (18.5))), Rad(0), Rad(0)), 0.3)
  242. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-4 + 3 * Sin(sine / (18.5))), Rad(0), Rad(0)), 0.3)
  243. clerp(RH, RHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))-Rad(0 * Sin(sine / (18.5*2))), Rad(-6), Rad(0)), 0.15)
  244. clerp(LH, LHnor*CFrame.new(0, 0.1-0.05 * Sin(sine / 18.5), 0)*CFrame.Angles(Rad(-5-0.2*Sin(sine / 18.5))+Rad(0 * Sin(sine / (18.5*2))), Rad(6), Rad(0)), 0.15)
  245. end
  246. elseif TORSOVELOCITY > 1 and hitfloor ~= nil then
  247. anim = "Walk"
  248. if attack == false then
  249. --[[
  250. if not holdingtool then
  251. rs.C0 = rs.C0:Lerp(rsc0 * cf(rtdist/1.75,0,rtdist/4.5) * angles(0,-rtdist/1.5,0),.25)
  252. else
  253. rs.C0 = rs.C0:Lerp(rsc0 * cf(0,0,0) * angles(rad(90),0,0),.25)
  254. end
  255. nec.C0 = nec.C0:Lerp(necc1 * cf(0,0,0)*angles(-rotfb/5.5+cos(sine/3.25)*rad(2.5),rotrl/2.75,cos(sine/3.25)*rad(2.5)),0.3)
  256. rootj.C0 = rootj.C0:Lerp(rootjnor * cf(0,sin(sine/3.25)/8.5,0)*angles(cos(sine/7.5)*rad(2.5),0,0)*angles(rotfb/5,0,rotrl/5),0.3)
  257. if not holdingtool then
  258. rs.C0 = rs.C0:Lerp(rsc1 * cf(0,0,0)*angles(rad(5)+cos(sine/7.5)*2*rad(30)*rotfb,-sin(sine/7.5)*2*rad(7.5),-.075),0.3)
  259. end
  260. ls.C0 = ls.C0:Lerp(LSnor * cf(0,0,0)*angles(rad(5)-cos(sine/7.5)*2*rad(30)*rotfb,-sin(sine/7.5)*2*rad(7.5),.075),0.3)
  261. rh.C0 = rh.C0:Lerp(RHnor * cf(0,sin(sine/7.5)/4,cos(sine/7.5)/2*legoff)*angles(-cos(sine/7.5)*rad(50)*rotfb,sin(sine/7.5)*2*rad(5),-.05-cos(sine/7.5)*2*rad(20)*rotrl),0.3)
  262. --cos(sine/7.5)*rad(50)*rotfb
  263. lh.C0 = lh.C0:Lerp(LHnor * cf(0,-sin(sine/7.5)/3,-cos(sine/7.5)/2*legoff) * angles(.05+cos(sine/7.5)*2*rad(20)*rotrl, sin(sine/7.5)*2*rad(5), 0),0.3)
  264. ]]
  265. clerp(rootj, rootjnor * CFrame.new(0, 0, -0.1+0.1 * Sin(sine / 3)) * CFrame.Angles(Rad(0), tors.RotVelocity.y/55, Rad(0)), 0.3)
  266. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(tors.RotVelocity.y/55), Rad(0)), 0.3)
  267. clerp(RH, RHnor * CFrame.new(0.15 + 0.15 * Sin(sine / 6), 0, 0) * CFrame.Angles(Rad(tors.RotVelocity.y/55), Rad(0), Rad(-11-55 * Cos(sine / 6))), 0.3)
  268. clerp(LH, LHnor * CFrame.new(-0.15 - 0.15 * Sin(sine / 6), 0, 0) * CFrame.Angles(Rad(-tors.RotVelocity.y/55), Rad(0), Rad(11-55 * Cos(sine / 6))), 0.3)
  269. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-7), Rad(0), Rad(55 * Cos(sine / 6))), 0.3)
  270. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-7), Rad(0), Rad(55 * Cos(sine / 6))), 0.3)
  271. end
  272. if attack == false and md == true then
  273. md = false
  274. local hey = moo:Clone()
  275. hey.Parent = script
  276. local fun = hey.coolepicdust
  277. fun.Anchored = true
  278. fun.CFrame = root.CFrame * CFrame.new(0, -root.Size.y*1.5, 0)
  279. fun.Name = "coolepicdust"
  280. fun.Material = "SmoothPlastic"
  281. fun.CanCollide = false
  282. fun.Color = Color3.new(1, 1, 1)
  283. fun.Size = Vector3.new(1, 1, 1)
  284. fun.Rotation = Vector3.new(math.random(-180, 180), math.random(-180, 180), math.random(-180, 180))
  285. coroutine.resume(coroutine.create(function()
  286. coroutine.resume(coroutine.create(function()
  287. wait(0.25)
  288. md = true
  289. end))
  290. wait(0.15)
  291. for i = 1,35 do
  292. Swait()
  293. --fun.Position = root.Position + Vector3.new(0, -root.Size.y, 0)
  294. fun.Size = fun.Size - Vector3.new(0.035, 0.035, 0.035)
  295. fun.Transparency = fun.Transparency + 0
  296. end
  297. fun:Destroy()
  298. end))
  299. end
  300. elseif torsverticalvel > 0.5 and hitfloor == nil then
  301. anim = "Jump"
  302. if attack == false and spid == "norm" then
  303. clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.15)
  304. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-15), Rad(0), Rad(0)), 0.15)
  305. clerp(RH, RHnor * CFrame.new(0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-15)), 0.15)
  306. clerp(LH, LHnor * CFrame.new(0.35/2, 0.35/2, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(15)), 0.15)
  307. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(160)), 0.15)
  308. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(35)), 0.15)
  309. elseif attack == false and spid == "fast" then
  310. clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.15)
  311. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-25), Rad(0), Rad(0)), 0.15)
  312. clerp(RH, RHnor * CFrame.new(0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-15)), 0.15)
  313. clerp(LH, LHnor * CFrame.new(-0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(15)), 0.15)
  314. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(175)), 0.15)
  315. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-175)), 0.15)
  316. end
  317. elseif torsverticalvel < 0.5 and hitfloor == nil then
  318. anim = "Fall"
  319. if attack == false and spid == "norm" then
  320. clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(15), Rad(0), Rad(0)), 0.2)
  321. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(15), Rad(0), Rad(0)), 0.2)
  322. clerp(RH, RHnor * CFrame.new(0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-15)), 0.15)
  323. clerp(LH, LHnor * CFrame.new(0.35/2, 0.35/2, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(15)), 0.15)
  324. clerp(RS, RSnor * CFrame.new(0, -0.5, 0.5) * CFrame.Angles(Rad(-85), Rad(0), Rad(0)), 0.2)
  325. clerp(LS, LSnor * CFrame.new(0, -0.5, 0.5) * CFrame.Angles(Rad(-85), Rad(0), Rad(0)), 0.2)
  326. elseif attack == false and spid == "fast" then
  327. clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.15)
  328. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(25), Rad(0), Rad(0)), 0.15)
  329. clerp(RH, RHnor * CFrame.new(0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-25)), 0.15)
  330. clerp(LH, LHnor * CFrame.new(-0.35, 0.35, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(25)), 0.15)
  331. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(145)), 0.15)
  332. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-145)), 0.15)
  333. end
  334. end
  335. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement