Advertisement
HenloMyDude

cheeki breeki

Oct 22nd, 2019
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.93 KB | None | 0 0
  1.  
  2. Player = owner
  3. Cam = workspace.CurrentCamera
  4. Backpack = Player.Backpack
  5. Character = Player.Character
  6. Humanoid = Character.Humanoid
  7. RootPart = Character["HumanoidRootPart"]
  8. Torso = Character["Torso"]
  9. Head = Character["Head"]
  10. RightArm = Character["Right Arm"]
  11. LeftArm = Character["Left Arm"]
  12. RightLeg = Character["Right Leg"]
  13. LeftLeg = Character["Left Leg"]
  14. RootJoint = RootPart["RootJoint"]
  15. Neck = Torso["Neck"]
  16. RightShoulder = Torso["Right Shoulder"]
  17. LeftShoulder = Torso["Left Shoulder"]
  18. RightHip = Torso["Right Hip"]
  19. LeftHip = Torso["Left Hip"]
  20. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  21. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  22. LH=Torso["Left Hip"]
  23. RH=Torso["Right Hip"]
  24. local TIME = 0
  25. local sick = Instance.new("Sound",RootPart)
  26. plr = owner
  27. char = plr.Character
  28. ch = plr.Character
  29. hum = char.Humanoid
  30. local cam = game.Workspace.CurrentCamera
  31. Camera = cam
  32. local CamInterrupt = false
  33. local TwoD = false
  34. local TargetInfo = {nil, nil}
  35. cam.CameraType = "Custom"
  36. t = char.Torso
  37. h = char.Head
  38. ra = char["Right Arm"]
  39. la = char["Left Arm"]
  40. rl = char["Right Leg"]
  41. ll = char["Left Leg"]
  42. tors = char.Torso
  43. lleg = char["Left Leg"]
  44. root = char.HumanoidRootPart
  45. hed = char.Head
  46. rleg = char["Right Leg"]
  47. rarm = char["Right Arm"]
  48. larm = char["Left Arm"]
  49. radian = math.rad
  50. random = math.random
  51. Vec3 = Vector3.new
  52. Inst = Instance.new
  53. cFrame = CFrame.new
  54. Euler = CFrame.fromEulerAnglesXYZ
  55. vt = Vector3.new
  56. bc = BrickColor.new
  57. br = BrickColor.random
  58. it = Instance.new
  59. cf = CFrame.new
  60. IT = Instance.new
  61. CF = CFrame.new
  62. VT = Vector3.new
  63. RAD = math.rad
  64. C3 = Color3.new
  65. UD2 = UDim2.new
  66. BRICKC = BrickColor.new
  67. ANGLES = CFrame.Angles
  68. EULER = CFrame.fromEulerAnglesXYZ
  69. COS = math.cos
  70. ACOS = math.acos
  71. SIN = math.sin
  72. ASIN = math.asin
  73. ABS = math.abs
  74. MRANDOM = math.random
  75. FLOOR = math.floor
  76. RSH=ch.Torso["Right Shoulder"]
  77. LSH=ch.Torso["Left Shoulder"]
  78. vt=Vector3.new
  79. cf=CFrame.new
  80. euler=CFrame.fromEulerAnglesXYZ
  81. angles=CFrame.Angles
  82. cloaked=false
  83. RootCF=euler(-1.57,0,3.14)
  84. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  85. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  86. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  87. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  88. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  89. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  90. --
  91. RSH.Parent=nil
  92. LSH.Parent=nil
  93. --
  94. RW.Name="Right Shoulder"
  95. RW.Part0=ch.Torso
  96. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  97. RW.C1=cf(0, 0.5, 0)
  98. RW.Part1=ch["Right Arm"]
  99. RW.Parent=ch.Torso
  100. --
  101. LW.Name="Left Shoulder"
  102. LW.Part0=ch.Torso
  103. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  104. LW.C1=cf(0, 0.5, 0)
  105. LW.Part1=ch["Left Arm"]
  106. LW.Parent=ch.Torso
  107. CF = CFrame.new
  108. angles = CFrame.Angles
  109. attack = false
  110. Euler = CFrame.fromEulerAnglesXYZ
  111. Rad = math.rad
  112. IT = Instance.new
  113. BrickC = BrickColor.new
  114. Cos = math.cos
  115. Acos = math.acos
  116. Sin = math.sin
  117. Asin = math.asin
  118. Abs = math.abs
  119. Mrandom = math.random
  120. Floor = math.floor
  121. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  122. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  123. Humanoid.MaxHealth = "3700"
  124. Humanoid.Health = "3700"
  125.  
  126. change = 1
  127. clerp2 = function(a, b, t)
  128. return a:lerp(b, t)
  129. end
  130.  
  131. --//=================================\\
  132. --|| USEFUL VALUES
  133. --\\=================================//
  134. local change = 1
  135. local SONG = 1175569393
  136. local sine = 0
  137. local Nuclear = false
  138. local flying = false
  139. Animation_Speed = 3
  140. local FORCERESET = false
  141. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  142. local Speed = 16
  143. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  144. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  145. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  146. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  147. local DAMAGEMULTIPLIER = 1
  148. local ANIM = "Idle"
  149. local ATTACK = false
  150. local EQUIPPED = false
  151. local HOLD = false
  152. local COMBO = 1
  153. local Rooted = false
  154. local SINE = 0
  155. local KEYHOLD = false
  156. local CHANGE = 2 / Animation_Speed
  157. local WALKINGANIM = false
  158. local VALUE1 = false
  159. local VALUE2 = false
  160. local ROBLOXIDLEANIMATION = IT("Animation")
  161. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  162. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  163. --ROBLOXIDLEANIMATION.Parent = Humanoid
  164. local kek = IT("Model")
  165. kek.Name = "Adds"
  166. local Weapon = IT("Model")
  167. Weapon.Name = "Adds"
  168. local Gun = IT("Model")
  169. Gun.Name = "Adds"
  170. local SMG = IT("Model")
  171. SMG.Name = "Adds"
  172. local SMG2 = IT("Model")
  173. SMG2.Name = "Adds"
  174. local SMG3 = IT("Model")
  175. SMG3.Name = "Adds"
  176. local Shotgun = IT("Model")
  177. Shotgun.Name = "Adds"
  178. local A47 = IT("Model")
  179. A47.Name = "Adds"
  180. local Supressor = IT("Model")
  181. Supressor.Name = "Adds"
  182. local knif = IT("Model")
  183. knif.Name = "Adds"
  184. local DE = IT("Model")
  185. DE.Name = "Adds"
  186. local AUG = IT("Model")
  187. AUG.Name = "Adds"
  188. local AWP = IT("Model")
  189. AWP.Name = "Adds"
  190. local R8RA = IT("Model")
  191. R8RA.Name = "Adds"
  192. local AR = IT("Model")
  193. AR.Name = "Adds"
  194. local Effects = IT("Folder", Weapon)
  195. Effects.Name = "Effects"
  196. local ANIMATOR = Humanoid.Animator
  197. local ANIMATE = Character:FindFirstChild("Animate")
  198. local UNANCHOR = true
  199. local TOBANISH = {}
  200. local CLOCKTARGET = nil
  201. local CLOCKSPEED = 2.5
  202. local CLOCKLOOP = 0
  203. local SIZE = 1
  204. local Mode = "Normal"
  205. --//=================================\\
  206. --\\=================================//
  207.  
  208. --//=================================\\
  209. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  210. --\\=================================//
  211.  
  212. ArtificialHB = Instance.new("BindableEvent", script)
  213. ArtificialHB.Name = "ArtificialHB"
  214.  
  215. script:WaitForChild("ArtificialHB")
  216.  
  217. frame = Frame_Speed
  218. tf = 0
  219. allowframeloss = false
  220. tossremainder = false
  221. lastframe = tick()
  222. script.ArtificialHB:Fire()
  223.  
  224. game:GetService("RunService").Heartbeat:connect(function(s, p)
  225. tf = tf + s
  226. if tf >= frame then
  227. if allowframeloss then
  228. script.ArtificialHB:Fire()
  229. lastframe = tick()
  230. else
  231. for i = 1, math.floor(tf / frame) do
  232. script.ArtificialHB:Fire()
  233. end
  234. lastframe = tick()
  235. end
  236. if tossremainder then
  237. tf = 0
  238. else
  239. tf = tf - frame * math.floor(tf / frame)
  240. end
  241. end
  242. end)
  243.  
  244. -- local sine = 0
  245. PlayerSize = 1
  246.  
  247. function clerp(a,b,t)
  248. local qa = {QuaternionFromCFrame(a)}
  249. local qb = {QuaternionFromCFrame(b)}
  250. local ax, ay, az = a.x, a.y, a.z
  251. local bx, by, bz = b.x, b.y, b.z
  252. local _t = 1-t
  253. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  254. end
  255.  
  256. function QuaternionFromCFrame(cf)
  257. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  258. local trace = m00 + m11 + m22
  259. if trace > 0 then
  260. local s = math.sqrt(1 + trace)
  261. local recip = 0.5/s
  262. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  263. else
  264. local i = 0
  265. if m11 > m00 then
  266. i = 1
  267. end
  268. if m22 > (i == 0 and m00 or m11) then
  269. i = 2
  270. end
  271. if i == 0 then
  272. local s = math.sqrt(m00-m11-m22+1)
  273. local recip = 0.5/s
  274. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  275. elseif i == 1 then
  276. local s = math.sqrt(m11-m22-m00+1)
  277. local recip = 0.5/s
  278. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  279. elseif i == 2 then
  280. local s = math.sqrt(m22-m00-m11+1)
  281. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  282. end
  283. end
  284. end
  285.  
  286. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  287. local xs, ys, zs = x + x, y + y, z + z
  288. local wx, wy, wz = w*xs, w*ys, w*zs
  289. local xx = x*xs
  290. local xy = x*ys
  291. local xz = x*zs
  292. local yy = y*ys
  293. local yz = y*zs
  294. local zz = z*zs
  295. 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))
  296. end
  297.  
  298.  
  299. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  300. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  301. end
  302.  
  303. function PositiveAngle(NUMBER)
  304. if NUMBER >= 0 then
  305. NUMBER = 0
  306. end
  307. return NUMBER
  308. end
  309.  
  310. function NegativeAngle(NUMBER)
  311. if NUMBER <= 0 then
  312. NUMBER = 0
  313. end
  314. return NUMBER
  315. end
  316.  
  317. function Swait(NUMBER)
  318. if NUMBER == 0 or NUMBER == nil then
  319. ArtificialHB.Event:wait()
  320. else
  321. for i = 1, NUMBER do
  322. ArtificialHB.Event:wait()
  323. end
  324. end
  325. end
  326.  
  327. function QuaternionFromCFrame(cf)
  328. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  329. local trace = m00 + m11 + m22
  330. if trace > 0 then
  331. local s = math.sqrt(1 + trace)
  332. local recip = 0.5 / s
  333. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  334. else
  335. local i = 0
  336. if m11 > m00 then
  337. i = 1
  338. end
  339. if m22 > (i == 0 and m00 or m11) then
  340. i = 2
  341. end
  342. if i == 0 then
  343. local s = math.sqrt(m00 - m11 - m22 + 1)
  344. local recip = 0.5 / s
  345. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  346. elseif i == 1 then
  347. local s = math.sqrt(m11 - m22 - m00 + 1)
  348. local recip = 0.5 / s
  349. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  350. elseif i == 2 then
  351. local s = math.sqrt(m22 - m00 - m11 + 1)
  352. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  353. end
  354. end
  355. end
  356.  
  357. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  358. local xs, ys, zs = x + x, y + y, z + z
  359. local wx, wy, wz = w * xs, w * ys, w * zs
  360. local xx = x * xs
  361. local xy = x * ys
  362. local xz = x * zs
  363. local yy = y * ys
  364. local yz = y * zs
  365. local zz = z * zs
  366. 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))
  367. end
  368. function swait(num)
  369. if num==0 or num==nil then
  370. game:service'RunService'.Stepped:wait(0)
  371. else
  372. for i=0,num do
  373. game:service'RunService'.Stepped:wait(0)
  374. end
  375. end
  376. end
  377. function QuaternionSlerp(a, b, t)
  378. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  379. local startInterp, finishInterp;
  380. if cosTheta >= 0.0001 then
  381. if (1 - cosTheta) > 0.0001 then
  382. local theta = ACOS(cosTheta)
  383. local invSinTheta = 1 / SIN(theta)
  384. startInterp = SIN((1 - t) * theta) * invSinTheta
  385. finishInterp = SIN(t * theta) * invSinTheta
  386. else
  387. startInterp = 1 - t
  388. finishInterp = t
  389. end
  390. else
  391. if (1 + cosTheta) > 0.0001 then
  392. local theta = ACOS(-cosTheta)
  393. local invSinTheta = 1 / SIN(theta)
  394. startInterp = SIN((t - 1) * theta) * invSinTheta
  395. finishInterp = SIN(t * theta) * invSinTheta
  396. else
  397. startInterp = t - 1
  398. finishInterp = t
  399. end
  400. end
  401. 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
  402. end
  403.  
  404. function Clerp(a, b, t)
  405. local qa = {QuaternionFromCFrame(a)}
  406. local qb = {QuaternionFromCFrame(b)}
  407. local ax, ay, az = a.x, a.y, a.z
  408. local bx, by, bz = b.x, b.y, b.z
  409. local _t = 1 - t
  410. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  411. end
  412.  
  413. rad = math.rad
  414. animationspeed = 2
  415. char.Animate.Disabled = true
  416.  
  417. while true do
  418. Swait()
  419. sine = sine + 1
  420. RootJoint.C0 = clerp2(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed)
  421. Neck.C0 = clerp2(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed)
  422. RW.C0=clerp(RW.C0,cf(1.5,0.5 + 0.05 * math.cos(sine / 8),0)*angles(math.rad(90-36*SIN(sine/8)),math.rad(0),math.rad(0)),.1)
  423. LW.C0=clerp(LW.C0,cf(-1.5,0.5 + 0.05 * math.cos(sine / 8),0)*angles(math.rad(90-36*SIN(sine/8)),math.rad(0),math.rad(0)),.1)
  424. RightHip.C0 = clerp2(RightHip.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
  425. LeftHip.C0 = clerp2(LeftHip.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
  426. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement