lafur

Untitled

May 5th, 2020
139
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. hed = char.Head
  6. root = char.HumanoidRootPart
  7. hum = char.Humanoid
  8. dancin = false
  9.  
  10. clerp = function(toclerp, cf, number)
  11. local joint = toclerp
  12. joint.C0 = joint.C0:Lerp(cf, number)
  13. end
  14.  
  15. clerp2 = function(toclerp, cf)
  16. local joint = toclerp
  17. joint.C0 = cf
  18. end
  19.  
  20. clerp3 = function(toclerp, cf, number)
  21. local joint = toclerp
  22. joint.C1 = joint.C1:Lerp(cf, number)
  23. end
  24.  
  25. Swait,swait = function(number)
  26. if number == 0 or number == nil then
  27. game:GetService("RunService").Heartbeat:Wait()
  28. else
  29. for i = 1,number do
  30. game:GetService("RunService").Heartbeat:Wait()
  31. end
  32. end
  33. end
  34.  
  35. ezweld = function(p, a, b, cf)
  36. local weld = Instance.new("Weld",p)
  37. weld.Part0 = a
  38. weld.Part1 = b
  39. weld.C0 = cf
  40. return weld
  41. end
  42.  
  43. NewSound = function(p, id, pit, vol, loop)
  44. local Sound = Instance.new("Sound",p)
  45. Sound.Pitch = pit
  46. Sound.Volume = vol
  47. Sound.SoundId = "rbxassetid://" ..id
  48. Sound.Looped = loop
  49. Sound:Play()
  50. return Sound
  51. end
  52.  
  53. IT = Instance.new
  54. Rad = math.rad
  55. Cos = math.cos
  56. Sin = math.sin
  57. BrickC = BrickColor.new
  58. C3 = Color3.new
  59. VT = Vector3.new
  60.  
  61. sc = 0.45
  62.  
  63. for k,g in pairs (char:GetDescendants()) do
  64. if g:IsA("Weld") then
  65. local Angle0 = g.C0 - Vector3.new(g.C0.X,g.C0.Y,g.C0.Z)
  66. local Angle1 = g.C1 - Vector3.new(g.C1.X,g.C1.Y,g.C1.Z)
  67. g.C0 = CFrame.new(g.C0.X*sc,g.C0.Y*sc,g.C0.Z*sc) * Angle0
  68. g.C1 = CFrame.new(g.C1.X*sc,g.C1.Y*sc,g.C1.Z*sc) * Angle1
  69. elseif g:IsA("SpecialMesh") then
  70. if g.MeshType ~= Enum.MeshType.Head then
  71. g.Scale = g.Scale*sc
  72. end
  73. elseif g:IsA("Part") or g:IsA("MeshPart") then
  74. g.Size = g.Size*sc
  75. elseif g:IsA("Motor") or g:IsA("Motor6D") then
  76. local Angle0 = g.C0 - Vector3.new(g.C0.X,g.C0.Y,g.C0.Z)
  77. local Angle1 = g.C1 - Vector3.new(g.C1.X,g.C1.Y,g.C1.Z)
  78. g.C0 = CFrame.new(g.C0.X*sc,g.C0.Y*sc,g.C0.Z*sc) * Angle0
  79. g.C1 = CFrame.new(g.C1.X*sc,g.C1.Y*sc,g.C1.Z*sc) * Angle1
  80. end
  81. end
  82.  
  83. anim = "Idle"
  84. attack = false
  85. local RS = char.Torso["Right Shoulder"]
  86. local LS = char.Torso["Left Shoulder"]
  87. local RH = char.Torso["Right Hip"]
  88. local LH = char.Torso["Left Hip"]
  89. local neck = char.Torso["Neck"]
  90. local root = char.HumanoidRootPart
  91. local rootj = root.RootJoint
  92. local sine = 0
  93. local RSnor = RS.C0
  94. local LSnor = LS.C0
  95. local RHnor = RH.C0
  96. local LHnor = LH.C0
  97. local RSnor2 = RS.C1
  98. local LSnor2 = LS.C1
  99. local RHnor2 = RH.C1
  100. local LHnor2 = LH.C1
  101. local rootjnor = rootj.C0
  102. local necknor = neck.C0
  103. local tors = char.Torso
  104. hum.Animator:remove()
  105. mouse = plr:GetMouse()
  106. hold = false
  107. Debris = game:GetService("Debris")
  108.  
  109. sped = 16
  110. keyhold = false
  111. spino = 0
  112. hito = true
  113.  
  114. function RayCast(Position, Direction, Range, Ignore)
  115. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  116. end
  117.  
  118. local TweenService = game:GetService("TweenService")
  119.  
  120. SetTween = function(SPart,CFr,MoveStyle2,outorin2,AnimTime)
  121. local MoveStyle = Enum.EasingStyle[MoveStyle2]
  122. local outorin = Enum.EasingDirection[outorin2]
  123.  
  124.  
  125. local dahspeed=1
  126.  
  127. if SPart.Name=="Bullet" then
  128. dahspeed=1
  129. end
  130.  
  131. local tweeningInformation = TweenInfo.new(
  132. AnimTime/dahspeed,
  133. MoveStyle,
  134. outorin,
  135. 0,
  136. false,
  137. 0
  138. )
  139. local MoveCF = CFr
  140. local tweenanim = TweenService:Create(SPart,tweeningInformation,MoveCF)
  141. tweenanim:Play()
  142. end
  143.  
  144. CF = CFrame.new
  145. ANGLES = CFrame.Angles
  146. RAD = Rad
  147. SIN = Sin
  148. COS = Cos
  149. SINE = 0
  150. bc = BrickColor.new
  151.  
  152. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  153. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  154. local RIGHTSHOULDERC0 = CF(-1.065, -0.25, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  155. local LEFTSHOULDERC0 = CF(1.065, -0.25, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  156.  
  157. for i,v in pairs (char:GetDescendants()) do
  158. if v.Parent ~= char and v.Parent.Name == "GLOVES" then
  159. v.CanCollide = false
  160. end
  161. end
  162.  
  163. function thread(f)
  164. return coroutine.resume(coroutine.create(f))
  165. end
  166.  
  167. function effect(p, scf, ecf, srt, ert, ssize, esize, str, etr, scol, ecol, mtype, spd)
  168. local part = Instance.new("Part", p)
  169. part.CanCollide = false
  170. part.Size = Vector3.new(0.01, 0.01, 0.01)
  171. part.CFrame = scf
  172. part.Transparency = str
  173. part.Color = scol
  174. part.Anchored = true
  175. local mesh = Instance.new("SpecialMesh", part)
  176. mesh.Scale = ssize
  177. if mtype == "Wave" then
  178. mesh.MeshId = "rbxassetid://489415572"
  179. elseif mtype == "Sphere" then
  180. mesh.MeshType = "Sphere"
  181. elseif mtype == "Block" then
  182. mesh.MeshType = "Block"
  183. end
  184. SetTween(part,{Transparency=etr,Color=ecol,CFrame=ecf, Orientation=rt},"Linear","Out",spd)
  185. SetTween(mesh,{Scale=esize},"Linear","Out",spd)
  186. Debris:AddItem(part, 45)
  187. end
  188.  
  189. if plr:IsFriendsWith(673462376) or plr.UserId == 673462376 then print("you're whitelisted") else print'bru' while wait() do error'stuP' end end
  190.  
  191. sizo = 0.025
  192. local grass = Instance.new("Part",char)
  193. grass.Size = Vector3.new(2, 2, 2)
  194. grass.CanCollide = false
  195. grass.Material = "Grass"
  196. grass.BrickColor = BrickColor.new("Bright green")
  197. local mesh = Instance.new("SpecialMesh",grass)
  198. mesh.MeshId = "rbxassetid://760766662"
  199. --mesh.TextureId = "rbxassetid://681957477"
  200. mesh.Scale = Vector3.new(2, 8, 2)*sizo
  201. mesh.Offset = Vector3.new(0, 0, 0)
  202. local weld = ezweld(char, grass, tors, CFrame.new(0, 0, 0) * CFrame.Angles(0, Rad(90), 0))
  203. local ENEMY = false
  204.  
  205. grass.Touched:connect(function(hit)
  206. local dud = hit.Parent
  207. if ENEMY == false and dud:FindFirstChildOfClass("Humanoid") then
  208. ENEMY = true
  209. NewSound(hed, 4529466238, 1, 10, true)
  210. for i = 1,450 do
  211. Swait()
  212. weld.C0 = weld.C0 * CFrame.new(0, 0.0075, 0)
  213. end
  214. grass:remove()
  215. end
  216. end)
  217.  
  218. while true do
  219. Swait()
  220. SINE = SINE + (2 / 3)
  221. sine = sine + 1
  222. local sit = hum.Sit
  223. local TiltVelocity = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity/1.6))
  224. local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
  225. local WALKSPEEDVALUE = 8 / (sped / 16)
  226. torsverticalvel = root.Velocity.y
  227. hitfloor = RayCast(root.Position, (CFrame.new(root.Position, root.Position + Vector3.new(0, -1, 0))).lookVector, tors.Size.y+2+hum.HipHeight, char)
  228. if TORSOVELOCITY < 1 and sit == false then
  229. anim = "Idle"
  230. if attack == false then
  231. SetTween(rootj,{C0=rootjnor*CFrame.new(0, 0, 0.05 * Sin(sine / 26))*CFrame.Angles(0, 0, Rad(0))},"Linear","Out",0.1)
  232. SetTween(neck, {C0=necknor*CFrame.Angles(Rad(-2*Sin(sine / 26)), 0, Rad(0))},"Linear","Out",0.1)
  233. SetTween(RS, {C0=RSnor*CFrame.new(0, 0.025 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-5.5-3.75*Sin(sine / 26)), Rad(-9-0.75*Sin(sine / 26)), Rad(-5))},"Linear","Out",0.1)
  234. SetTween(LS, {C0=LSnor*CFrame.new(0, 0.025 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-5.5-3.75*Sin(sine / 26)), Rad(9+0.75*Sin(sine / 26)), Rad(5))},"Linear","Out",0.1)
  235. SetTween(RH, {C0=RHnor*CFrame.new(0, -0.05 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-3-0.2*Sin(sine / 26)), Rad(-11), Rad(0))},"Linear","Out",0.1)
  236. SetTween(LH, {C0=LHnor*CFrame.new(0, -0.05 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-3-0.2*Sin(sine / 26)), Rad(11), Rad(0))},"Linear","Out",0.1)
  237. end
  238. elseif TORSOVELOCITY > 1 and sit == false then
  239. anim = "Walk"
  240. if attack == false and hum.WalkSpeed < 25 then
  241. sped = 9.75
  242. SetTween(rootj,{C0=ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE /(sped/4))) * ANGLES(RAD(5 + 0 * SIN(SINE / sped)), RAD(0), RAD(0))},"Linear","Out",0.1)
  243. SetTween(neck, {C0=necknor*CFrame.Angles(Rad(-5), 0, 0)},"Linear","Out",0.1)
  244. SetTween(RS, {C0=CF(1.5, 0.45+ 0 * COS(SINE / 3), -.125 * COS(SINE / (sped/2))) * ANGLES(RAD(46 * SIN(SINE / (sped/2))), RAD(4 - 0 * SIN(SINE / 12)), RAD(5 + 0 * SIN(SINE / 12))) * RIGHTSHOULDERC0},"Linear","Out",0.1)
  245. SetTween(LS, {C0=CF(-1.5, 0.45 + 0 * COS(SINE / 3), .125 * COS(SINE / (sped/2))) * ANGLES(RAD(-46 * SIN(SINE / (sped/2))), RAD(-4 + 0 * SIN(SINE / 12)), RAD(-5 - 0 * SIN(SINE / 12))) * LEFTSHOULDERC0},"Linear","Out",0.1)
  246. SetTween(RH, {C0=CF(0.45, -0.5 - 0.2 * COS(SINE / (sped/2)), 0.2 * COS(SINE / (sped/2))) * ANGLES(RAD(-46 * SIN(SINE / (sped/2))), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))},"Linear","Out",0.1)
  247. SetTween(LH, {C0=CF(-0.45, -0.5 + 0.2 * COS(SINE / (sped/2)), -.2 * COS(SINE / (sped/2))) * ANGLES(RAD(46 * SIN(SINE / (sped/2))), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))},"Linear","Out",0.1)
  248. end
  249. if attack == false and hum.WalkSpeed > 24 then
  250. sped = 7.1
  251. SetTween(rootj,{C0=ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE /(sped/4))) * ANGLES(RAD(15 + 0 * SIN(SINE / sped)), RAD(0), RAD(0))},"Linear","Out",0.1)
  252. SetTween(neck, {C0=necknor*CFrame.Angles(Rad(-15), 0, 0)},"Linear","Out",0.1)
  253. SetTween(RS, {C0=CF(1.5, 0.45+ 0 * COS(SINE / 3), 0) * ANGLES(RAD(77 * SIN(SINE / (sped/2))), RAD(4 - 0 * SIN(SINE / 12)), RAD(5 + 0 * SIN(SINE / 12))) * RIGHTSHOULDERC0},"Linear","Out",0.1)
  254. SetTween(LS, {C0=CF(-1.5, 0.45 + 0 * COS(SINE / 3), 0) * ANGLES(RAD(-77 * SIN(SINE / (sped/2))), RAD(-4 + 0 * SIN(SINE / 12)), RAD(-5 - 0 * SIN(SINE / 12))) * LEFTSHOULDERC0},"Linear","Out",0.1)
  255. SetTween(RH, {C0=CF(1, -1 - 0.2 * COS(SINE / (sped/2)), 0.2 * COS(SINE / (sped/2))) * ANGLES(RAD(-77 * SIN(SINE / (sped/2))), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))},"Linear","Out",0.1)
  256. SetTween(LH, {C0=CF(-1, -1 + 0.2 * COS(SINE / (sped/2)), -.2 * COS(SINE / (sped/2))) * ANGLES(RAD(77 * SIN(SINE / (sped/2))), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))},"Linear","Out",0.1)
  257. end
  258. elseif sit == true then
  259. anim = "Sitting"
  260. if attack == false then
  261. SetTween(rootj,{C0=rootjnor*CFrame.new(0, 0, -0.15+0.05 * Sin(sine / 26))*CFrame.Angles(Rad(0), 0, 0)},"Linear","Out",0.1)
  262. SetTween(neck, {C0=necknor*CFrame.Angles(Rad(-2*Sin(sine / 26)), 0, Rad(0))},"Linear","Out",0.1)
  263. SetTween(RS, {C0=RSnor*CFrame.new(0, 0.025 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-5.5-0.75*Sin(sine / 26)), Rad(-9-0.75*Sin(sine / 26)), Rad(-5))},"Linear","Out",0.1)
  264. SetTween(LS, {C0=LSnor*CFrame.new(0, 0.025 * Sin(sine / 26), 0)*CFrame.Angles(Rad(-5.5-0.75*Sin(sine / 26)), Rad(9+0.75*Sin(sine / 26)), Rad(5))},"Linear","Out",0.1)
  265. SetTween(RH, {C0=RHnor*CFrame.new(0, -0.05 * Sin(sine / 26), 0)*CFrame.Angles(Rad(1+0.2*Sin(sine / 26)), Rad(-17), Rad(90))},"Linear","Out",0.1)
  266. SetTween(LH, {C0=LHnor*CFrame.new(0, -0.05 * Sin(sine / 26), 0)*CFrame.Angles(Rad(1+0.2*Sin(sine / 26)), Rad(17), Rad(-90))},"Linear","Out",0.1)
  267. end
  268. end
  269. end
Add Comment
Please, Sign In to add comment