Advertisement
GodOfDuckz

some bored d0d

Jun 11th, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.95 KB | None | 0 0
  1. print'Made by boss_kiddos'
  2.  
  3. --Some Bored Dude--
  4. --The Script By boss_kiddos--
  5. --Make a credits to me.
  6. --HOBBY: ABUSING!!! jk. my hobby is editing.
  7.  
  8. print'sorry i copied other script animation by shackluster'
  9. print'and some by goodguyaiden'
  10. wait(0.2)
  11. local Player = game:service'Players'.localPlayer
  12. local chara = Player.Character
  13. Player=game:GetService("Players").LocalPlayer
  14. Character=Player.Character
  15. PlayerGui=Player.PlayerGui
  16. Backpack=Player.Backpack
  17. Torso=Character.Torso
  18. Head=Character.Head
  19. Humanoid=Character.Humanoid
  20. m=Instance.new('Model',Character)
  21. LeftArm=Character["Left Arm"]
  22. LeftLeg=Character["Left Leg"]
  23. RightArm=Character["Right Arm"]
  24. RightLeg=Character["Right Leg"]
  25. LS=Torso["Left Shoulder"]
  26. LH=Torso["Left Hip"]
  27. RS=Torso["Right Shoulder"]
  28. RH=Torso["Right Hip"]
  29. Face = Head.face
  30. Neck=Torso.Neck
  31. it=Instance.new
  32. attacktype=1
  33. vt=Vector3.new
  34. cf=CFrame.new
  35. cl3=Color3.new
  36. rgb=Color3.fromRGB
  37. bcn=BrickColor.new
  38. euler=CFrame.fromEulerAnglesXYZ
  39. angles=CFrame.Angles
  40. Humanoid.WalkSpeed = 16
  41. Player = game:GetService("Players").LocalPlayer
  42. PlayerGui = Player.PlayerGui
  43. Cam = workspace.CurrentCamera
  44. Backpack = Player.Backpack
  45. Character = Player.Character
  46. Humanoid = Character.Humanoid
  47. Mouse = Player:GetMouse()
  48. RootPart = Character["HumanoidRootPart"]
  49. Torso = Character["Torso"]
  50. Head = Character["Head"]
  51. RightArm = Character["Right Arm"]
  52. LeftArm = Character["Left Arm"]
  53. RightLeg = Character["Right Leg"]
  54. LeftLeg = Character["Left Leg"]
  55. RootJoint = RootPart["RootJoint"]
  56. Neck = Torso["Neck"]
  57. RightShoulder = Torso["Right Shoulder"]
  58. LeftShoulder = Torso["Left Shoulder"]
  59. RightHip = Torso["Right Hip"]
  60. LeftHip = Torso["Left Hip"]
  61. local Player = game:service'Players'.localPlayer
  62. local chara = Player.Character
  63.  
  64. shirt= Instance.new("Shirt", Character)
  65. shirt.Name = "Shirt"
  66. pants = Instance.new("Pants", Character)
  67. pants.Name = "Pants"
  68. chara.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=406005851"
  69. chara.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=405864507"
  70. pumpk = Instance.new("Sound")
  71. pumpk.Parent = game.Players.LocalPlayer.Character.Head
  72. pumpk.SoundId = "rbxassetid://982538854"
  73. pumpk.Volume = 3
  74. pumpk.Looped = true
  75. pumpk:Play()
  76. IT = Instance.new
  77. CF = CFrame.new
  78. VT = Vector3.new
  79. RAD = math.rad
  80. C3 = Color3.new
  81. UD2 = UDim2.new
  82. BRICKC = BrickColor.new
  83. ANGLES = CFrame.Angles
  84. EULER = CFrame.fromEulerAnglesXYZ
  85. COS = math.cos
  86. ACOS = math.acos
  87. SIN = math.sin
  88. ASIN = math.asin
  89. ABS = math.abs
  90. MRANDOM = math.random
  91. FLOOR = math.floor
  92. Animation_Speed = 3
  93. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  94. local Speed = 12
  95. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  96. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  97. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  98. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  99. local DAMAGEMULTIPLIER = 1
  100. local ANIM = "Idle"
  101. local ATTACK = false
  102. local EQUIPPED = false
  103. local HOLD = false
  104. local COMBO = 1
  105. local Rooted = false
  106. local SINE = 0
  107. local KEYHOLD = false
  108. local CHANGE = 2 / Animation_Speed
  109. local WALKINGANIM = false
  110. local VALUE1 = false
  111. local VALUE2 = false
  112. local ROBLOXIDLEANIMATION = IT("Animation")
  113. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  114. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  115. --ROBLOXIDLEANIMATION.Parent = Humanoid
  116. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  117. WEAPONGUI.Name = "Weapon GUI"
  118. local Weapon = IT("Model")
  119. Weapon.Name = "Adds"
  120. local Effects = IT("Folder", Weapon)
  121. Effects.Name = "Effects"
  122. local ANIMATOR = Humanoid.Animator
  123. local ANIMATE = Character.Animate
  124. local UNANCHOR = true
  125. local PLAYANIMS = true
  126. ArtificialHB = Instance.new("BindableEvent", script)
  127. ArtificialHB.Name = "ArtificialHB"
  128.  
  129. script:WaitForChild("ArtificialHB")
  130.  
  131. frame = Frame_Speed
  132. tf = 0
  133. allowframeloss = false
  134. tossremainder = false
  135. lastframe = tick()
  136. script.ArtificialHB:Fire()
  137.  
  138. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  139. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  140. end
  141.  
  142. function PositiveAngle(NUMBER)
  143. if NUMBER >= 0 then
  144. NUMBER = 0
  145. end
  146. return NUMBER
  147. end
  148.  
  149. function NegativeAngle(NUMBER)
  150. if NUMBER <= 0 then
  151. NUMBER = 0
  152. end
  153. return NUMBER
  154. end
  155.  
  156. function Swait(NUMBER)
  157. if NUMBER == 0 or NUMBER == nil then
  158. ArtificialHB.Event:wait()
  159. else
  160. for i = 1, NUMBER do
  161. ArtificialHB.Event:wait()
  162. end
  163. end
  164. end
  165.  
  166. function QuaternionFromCFrame(cf)
  167. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  168. local trace = m00 + m11 + m22
  169. if trace > 0 then
  170. local s = math.sqrt(1 + trace)
  171. local recip = 0.5 / s
  172. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  173. else
  174. local i = 0
  175. if m11 > m00 then
  176. i = 1
  177. end
  178. if m22 > (i == 0 and m00 or m11) then
  179. i = 2
  180. end
  181. if i == 0 then
  182. local s = math.sqrt(m00 - m11 - m22 + 1)
  183. local recip = 0.5 / s
  184. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  185. elseif i == 1 then
  186. local s = math.sqrt(m11 - m22 - m00 + 1)
  187. local recip = 0.5 / s
  188. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  189. elseif i == 2 then
  190. local s = math.sqrt(m22 - m00 - m11 + 1)
  191. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  192. end
  193. end
  194. end
  195.  
  196. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  197. local xs, ys, zs = x + x, y + y, z + z
  198. local wx, wy, wz = w * xs, w * ys, w * zs
  199. local xx = x * xs
  200. local xy = x * ys
  201. local xz = x * zs
  202. local yy = y * ys
  203. local yz = y * zs
  204. local zz = z * zs
  205. 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))
  206. end
  207.  
  208. function QuaternionSlerp(a, b, t)
  209. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  210. local startInterp, finishInterp;
  211. if cosTheta >= 0.0001 then
  212. if (1 - cosTheta) > 0.0001 then
  213. local theta = ACOS(cosTheta)
  214. local invSinTheta = 1 / SIN(theta)
  215. startInterp = SIN((1 - t) * theta) * invSinTheta
  216. finishInterp = SIN(t * theta) * invSinTheta
  217. else
  218. startInterp = 1 - t
  219. finishInterp = t
  220. end
  221. else
  222. if (1 + cosTheta) > 0.0001 then
  223. local theta = ACOS(-cosTheta)
  224. local invSinTheta = 1 / SIN(theta)
  225. startInterp = SIN((t - 1) * theta) * invSinTheta
  226. finishInterp = SIN(t * theta) * invSinTheta
  227. else
  228. startInterp = t - 1
  229. finishInterp = t
  230. end
  231. end
  232. 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
  233. end
  234.  
  235. function Clerp(a, b, t)
  236. local qa = {QuaternionFromCFrame(a)}
  237. local qb = {QuaternionFromCFrame(b)}
  238. local ax, ay, az = a.x, a.y, a.z
  239. local bx, by, bz = b.x, b.y, b.z
  240. local _t = 1 - t
  241. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  242. end
  243.  
  244. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  245. local frame = IT("Frame")
  246. frame.BackgroundTransparency = TRANSPARENCY
  247. frame.BorderSizePixel = BORDERSIZEPIXEL
  248. frame.Position = POSITION
  249. frame.Size = SIZE
  250. frame.BackgroundColor3 = COLOR
  251. frame.BorderColor3 = BORDERCOLOR
  252. frame.Name = NAME
  253. frame.Parent = PARENT
  254. return frame
  255. end
  256.  
  257. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  258. local label = IT("TextLabel")
  259. label.BackgroundTransparency = 1
  260. label.Size = UD2(1, 0, 1, 0)
  261. label.Position = UD2(0, 0, 0, 0)
  262. label.TextColor3 = TEXTCOLOR
  263. label.TextStrokeTransparency = STROKETRANSPARENCY
  264. label.TextTransparency = TRANSPARENCY
  265. label.FontSize = TEXTFONTSIZE
  266. label.Font = TEXTFONT
  267. label.BorderSizePixel = BORDERSIZEPIXEL
  268. label.TextScaled = false
  269. label.Text = TEXT
  270. label.Name = NAME
  271. label.Parent = PARENT
  272. return label
  273. end
  274.  
  275. function NoOutlines(PART)
  276. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  277. end
  278.  
  279.  
  280. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  281. local NEWWELD = IT(TYPE)
  282. NEWWELD.Part0 = PART0
  283. NEWWELD.Part1 = PART1
  284. NEWWELD.C0 = C0
  285. NEWWELD.C1 = C1
  286. NEWWELD.Parent = PARENT
  287. return NEWWELD
  288. end
  289.  
  290. local S = IT("Sound")
  291.  
  292. function CreateSound(ID, PARENT, VOLUME, PITCH)
  293. local NEWSOUND = nil
  294. coroutine.resume(coroutine.create(function()
  295. NEWSOUND = S:Clone()
  296. NEWSOUND.Parent = PARENT
  297. NEWSOUND.Volume = VOLUME
  298. NEWSOUND.Pitch = PITCH
  299. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  300. Swait()
  301. NEWSOUND:play()
  302. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  303. end))
  304. return NEWSOUND
  305. end
  306.  
  307. function CFrameFromTopBack(at, top, back)
  308. local right = top:Cross(back)
  309. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  310. end
  311.  
  312. function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  313. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  314. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  315. wave.CFrame = CFRAME
  316. coroutine.resume(coroutine.create(function(PART)
  317. for i = 1, WAIT do
  318. Swait()
  319. mesh.Scale = mesh.Scale + GROW
  320. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  321. if DOESROT == true then
  322. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  323. end
  324. wave.Transparency = wave.Transparency + (0.5/WAIT)
  325. if wave.Transparency > 0.99 then
  326. wave:remove()
  327. end
  328. end
  329. end))
  330. end
  331.  
  332. function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
  333. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  334. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
  335. wave.CFrame = CFRAME
  336. coroutine.resume(coroutine.create(function(PART)
  337. for i = 1, WAIT do
  338. Swait()
  339. mesh.Scale = mesh.Scale + GROW
  340. if DOESROT == true then
  341. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  342. end
  343. wave.Transparency = wave.Transparency + (0.5/WAIT)
  344. if wave.Transparency > 0.99 then
  345. wave:remove()
  346. end
  347. end
  348. end))
  349. end
  350.  
  351. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  352. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  353. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  354. wave.CFrame = CFRAME
  355. coroutine.resume(coroutine.create(function(PART)
  356. for i = 1, WAIT do
  357. Swait()
  358. mesh.Scale = mesh.Scale + GROW
  359. wave.Transparency = wave.Transparency + (1/WAIT)
  360. if wave.Transparency > 0.99 then
  361. wave:remove()
  362. end
  363. end
  364. end))
  365. end
  366.  
  367. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  368. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  369. local mesh = nil
  370. if KIND == "Base" then
  371. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  372. elseif KIND == "Thin" then
  373. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  374. elseif KIND == "Round" then
  375. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  376. end
  377. wave.CFrame = CFRAME
  378. coroutine.resume(coroutine.create(function(PART)
  379. for i = 1, WAIT do
  380. Swait()
  381. mesh.Scale = mesh.Scale + GROW/10
  382. wave.Transparency = wave.Transparency + (0.5/WAIT)
  383. if wave.Transparency > 0.99 then
  384. wave:remove()
  385. end
  386. end
  387. end))
  388. end
  389.  
  390. function MakeForm(PART,TYPE)
  391. if TYPE == "Cyl" then
  392. local MSH = IT("CylinderMesh",PART)
  393. elseif TYPE == "Ball" then
  394. local MSH = IT("SpecialMesh",PART)
  395. MSH.MeshType = "Sphere"
  396. elseif TYPE == "Wedge" then
  397. local MSH = IT("SpecialMesh",PART)
  398. MSH.MeshType = "Wedge"
  399. end
  400. end
  401.  
  402.  
  403. function CheckTableForString(Table, String)
  404. for i, v in pairs(Table) do
  405. if string.find(string.lower(String), string.lower(v)) then
  406. return true
  407. end
  408. end
  409. return false
  410. end
  411.  
  412. function CheckIntangible(Hit)
  413. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  414. if Hit and Hit.Parent then
  415. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  416. return true
  417. end
  418. end
  419. return false
  420. end
  421.  
  422. Debris = game:GetService("Debris")
  423.  
  424. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  425. local Direction = CFrame.new(StartPos, Vec).lookVector
  426. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  427. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  428. if RayHit and CheckIntangible(RayHit) then
  429. if DelayIfHit then
  430. wait()
  431. end
  432. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  433. end
  434. return RayHit, RayPos, RayNormal
  435. end
  436.  
  437. function turnto(position)
  438. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  439. end
  440.  
  441.  
  442.  
  443. game:GetService("RunService").Heartbeat:connect(function(s, p)
  444. tf = tf + s
  445. if tf >= frame then
  446. if allowframeloss then
  447. script.ArtificialHB:Fire()
  448. lastframe = tick()
  449. else
  450. for i = 1, math.floor(tf / frame) do
  451. script.ArtificialHB:Fire()
  452. end
  453. lastframe = tick()
  454. end
  455. if tossremainder then
  456. tf = 0
  457. else
  458. tf = tf - frame * math.floor(tf / frame)
  459. end
  460. end
  461. end)
  462. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  463. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  464. end
  465.  
  466. function PositiveAngle(NUMBER)
  467. if NUMBER >= 0 then
  468. NUMBER = 0
  469. end
  470. return NUMBER
  471. end
  472.  
  473. function NegativeAngle(NUMBER)
  474. if NUMBER <= 0 then
  475. NUMBER = 0
  476. end
  477. return NUMBER
  478. end
  479.  
  480. function Swait(NUMBER)
  481. if NUMBER == 0 or NUMBER == nil then
  482. ArtificialHB.Event:wait()
  483. else
  484. for i = 1, NUMBER do
  485. ArtificialHB.Event:wait()
  486. end
  487. end
  488. end
  489.  
  490. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  491. local NEWMESH = IT(MESH)
  492. if MESH == "SpecialMesh" then
  493. NEWMESH.MeshType = MESHTYPE
  494. if MESHID ~= "nil" and MESHID ~= "" then
  495. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  496. end
  497. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  498. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  499. end
  500. end
  501. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  502. NEWMESH.Scale = SCALE
  503. NEWMESH.Parent = PARENT
  504. return NEWMESH
  505. end
  506.  
  507. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  508. local NEWPART = IT("Part")
  509. NEWPART.formFactor = FORMFACTOR
  510. NEWPART.Reflectance = REFLECTANCE
  511. NEWPART.Transparency = TRANSPARENCY
  512. NEWPART.CanCollide = false
  513. NEWPART.Locked = true
  514. NEWPART.Anchored = true
  515. if ANCHOR == false then
  516. NEWPART.Anchored = false
  517. end
  518. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  519. NEWPART.Name = NAME
  520. NEWPART.Size = SIZE
  521. NEWPART.Position = Torso.Position
  522. NEWPART.Material = MATERIAL
  523. NEWPART:BreakJoints()
  524. NEWPART.Parent = PARENT
  525. return NEWPART
  526. end
  527.  
  528. local function weldBetween(a, b)
  529. local weldd = Instance.new("ManualWeld")
  530. weldd.Part0 = a
  531. weldd.Part1 = b
  532. weldd.C0 = CFrame.new()
  533. weldd.C1 = b.CFrame:inverse() * a.CFrame
  534. weldd.Parent = a
  535. return weldd
  536. end
  537.  
  538.  
  539. function QuaternionFromCFrame(cf)
  540. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  541. local trace = m00 + m11 + m22
  542. if trace > 0 then
  543. local s = math.sqrt(1 + trace)
  544. local recip = 0.5 / s
  545. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  546. else
  547. local i = 0
  548. if m11 > m00 then
  549. i = 1
  550. end
  551. if m22 > (i == 0 and m00 or m11) then
  552. i = 2
  553. end
  554. if i == 0 then
  555. local s = math.sqrt(m00 - m11 - m22 + 1)
  556. local recip = 0.5 / s
  557. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  558. elseif i == 1 then
  559. local s = math.sqrt(m11 - m22 - m00 + 1)
  560. local recip = 0.5 / s
  561. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  562. elseif i == 2 then
  563. local s = math.sqrt(m22 - m00 - m11 + 1)
  564. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  565. end
  566. end
  567. end
  568.  
  569. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  570. local xs, ys, zs = x + x, y + y, z + z
  571. local wx, wy, wz = w * xs, w * ys, w * zs
  572. local xx = x * xs
  573. local xy = x * ys
  574. local xz = x * zs
  575. local yy = y * ys
  576. local yz = y * zs
  577. local zz = z * zs
  578. 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))
  579. end
  580.  
  581. function QuaternionSlerp(a, b, t)
  582. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  583. local startInterp, finishInterp;
  584. if cosTheta >= 0.0001 then
  585. if (1 - cosTheta) > 0.0001 then
  586. local theta = ACOS(cosTheta)
  587. local invSinTheta = 1 / SIN(theta)
  588. startInterp = SIN((1 - t) * theta) * invSinTheta
  589. finishInterp = SIN(t * theta) * invSinTheta
  590. else
  591. startInterp = 1 - t
  592. finishInterp = t
  593. end
  594. else
  595. if (1 + cosTheta) > 0.0001 then
  596. local theta = ACOS(-cosTheta)
  597. local invSinTheta = 1 / SIN(theta)
  598. startInterp = SIN((t - 1) * theta) * invSinTheta
  599. finishInterp = SIN(t * theta) * invSinTheta
  600. else
  601. startInterp = t - 1
  602. finishInterp = t
  603. end
  604. end
  605. 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
  606. end
  607.  
  608. function Clerp(a, b, t)
  609. local qa = {QuaternionFromCFrame(a)}
  610. local qb = {QuaternionFromCFrame(b)}
  611. local ax, ay, az = a.x, a.y, a.z
  612. local bx, by, bz = b.x, b.y, b.z
  613. local _t = 1 - t
  614. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  615. end
  616.  
  617. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  618. local frame = IT("Frame")
  619. frame.BackgroundTransparency = TRANSPARENCY
  620. frame.BorderSizePixel = BORDERSIZEPIXEL
  621. frame.Position = POSITION
  622. frame.Size = SIZE
  623. frame.BackgroundColor3 = COLOR
  624. frame.BorderColor3 = BORDERCOLOR
  625. frame.Name = NAME
  626. frame.Parent = PARENT
  627. return frame
  628. end
  629.  
  630. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  631. local label = IT("TextLabel")
  632. label.BackgroundTransparency = 1
  633. label.Size = UD2(1, 0, 1, 0)
  634. label.Position = UD2(0, 0, 0, 0)
  635. label.TextColor3 = TEXTCOLOR
  636. label.TextStrokeTransparency = STROKETRANSPARENCY
  637. label.TextTransparency = TRANSPARENCY
  638. label.FontSize = TEXTFONTSIZE
  639. label.Font = TEXTFONT
  640. label.BorderSizePixel = BORDERSIZEPIXEL
  641. label.TextScaled = false
  642. label.Text = TEXT
  643. label.Name = NAME
  644. label.Parent = PARENT
  645. return label
  646. end
  647.  
  648. function NoOutlines(PART)
  649. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  650. end
  651.  
  652. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  653. local NEWWELD = IT(TYPE)
  654. NEWWELD.Part0 = PART0
  655. NEWWELD.Part1 = PART1
  656. NEWWELD.C0 = C0
  657. NEWWELD.C1 = C1
  658. NEWWELD.Parent = PARENT
  659. return NEWWELD
  660. end
  661.  
  662. local S = IT("Sound")
  663. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  664. local NEWSOUND = nil
  665. coroutine.resume(coroutine.create(function()
  666. NEWSOUND = S:Clone()
  667. NEWSOUND.Parent = PARENT
  668. NEWSOUND.Volume = VOLUME
  669. NEWSOUND.Pitch = PITCH
  670. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  671. NEWSOUND:play()
  672. if DOESLOOP == true then
  673. NEWSOUND.Looped = true
  674. else
  675. repeat wait(1) until NEWSOUND.Playing == false
  676. NEWSOUND:remove()
  677. end
  678. end))
  679. return NEWSOUND
  680. end
  681.  
  682. function MakeForm(PART,TYPE)
  683. if TYPE == "Cyl" then
  684. local MSH = IT("CylinderMesh",PART)
  685. elseif TYPE == "Ball" then
  686. local MSH = IT("SpecialMesh",PART)
  687. MSH.MeshType = "Sphere"
  688. elseif TYPE == "Wedge" then
  689. local MSH = IT("SpecialMesh",PART)
  690. MSH.MeshType = "Wedge"
  691. end
  692. end
  693.  
  694. function CFrameFromTopBack(at, top, back)
  695. local right = top:Cross(back)
  696. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  697. end
  698.  
  699. function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
  700. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
  701. if HITFLOOR ~= nil then
  702. if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  703. if HITFLOOR.Name == "BloodPuddle" then
  704. local DIST = (Position - HITFLOOR.Position).Magnitude
  705. if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then
  706. HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
  707. end
  708. else
  709. if HITFLOOR.Anchored == true then
  710. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
  711. BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
  712. MakeForm(BLOOD,"Cyl")
  713. coroutine.resume(coroutine.create(function()
  714. Swait(75)
  715. while true do
  716. Swait()
  717. BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
  718. if BLOOD.Size.Z < 0.051 then
  719. BLOOD:remove()
  720. break
  721. end
  722. end
  723. end))
  724. end
  725. end
  726. end
  727. end
  728. end
  729.  
  730. function SprayBlood(POSITION,DIRECTION,BloodSize)
  731. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
  732. BLOOD.CFrame = CF(POSITION)
  733. MakeForm(BLOOD,"Ball")
  734. local bv = Instance.new("BodyVelocity",BLOOD)
  735. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  736. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  737. bv.Name = "MOVE"
  738. Debris:AddItem(bv,0.05)
  739. coroutine.resume(coroutine.create(function()
  740. local HASTOUCHEDGROUND = false
  741. local HIT = BLOOD.Touched:Connect(function(hit)
  742. if hit.Anchored == true then
  743. HASTOUCHEDGROUND = true
  744. PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
  745. end
  746. end)
  747. wait(5)
  748. if HASTOUCHEDGROUND == false then
  749. BLOOD:remove()
  750. end
  751. end))
  752. end
  753.  
  754. Debris = game:GetService("Debris")
  755.  
  756. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  757. local DIRECTION = CF(StartPos,EndPos).lookVector
  758. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  759. end
  760.  
  761. function turnto(position)
  762. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  763. end
  764.  
  765. function recurse(root,callback,i)
  766. i= i or 0
  767. for _,v in pairs(root:GetChildren()) do
  768. i = i + 1
  769. callback(i,v)
  770.  
  771. if #v:GetChildren() > 0 then
  772. i = recurse(v,callback,i)
  773. end
  774. end
  775.  
  776. return i
  777. end
  778.  
  779. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  780. attachmentName = attachmentName.."RigAttachment"
  781. local constraint = Instance.new(className.."Constraint")
  782. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  783. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  784. constraint.Name = "RagdollConstraint"..part1.Name
  785.  
  786. for _,propertyData in next,properties or {} do
  787. constraint[propertyData[1]] = propertyData[2]
  788. end
  789.  
  790. constraint.Parent = character
  791. end
  792.  
  793. function getAttachment0(character, attachmentName)
  794. for _,child in next,character:GetChildren() do
  795. local attachment = child:FindFirstChild(attachmentName)
  796. if attachment then
  797. return attachment
  798. end
  799. end
  800. end
  801.  
  802. function R15Ragdoll(character)
  803. recurse(character, function(_,v)
  804. if v:IsA("Attachment") then
  805. v.Axis = Vector3.new(0, 1, 0)
  806. v.SecondaryAxis = Vector3.new(0, 0, 1)
  807. v.Rotation = Vector3.new(0, 0, 0)
  808. end
  809. end)
  810. for _,child in next,character:GetChildren() do
  811. if child:IsA("Accoutrement") then
  812. for _,part in next,child:GetChildren() do
  813. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  814. local attachment1 = part:FindFirstChildOfClass("Attachment")
  815. local attachment0 = getAttachment0(character,attachment1.Name)
  816. if attachment0 and attachment1 then
  817. local constraint = Instance.new("HingeConstraint")
  818. constraint.Attachment0 = attachment0
  819. constraint.Attachment1 = attachment1
  820. constraint.LimitsEnabled = true
  821. constraint.UpperAngle = 0
  822. constraint.LowerAngle = 0
  823. constraint.Parent = character
  824. end
  825. elseif part.Name == "HumanoidRootPart" then
  826. part:remove()
  827. end
  828. end
  829. end
  830. end
  831.  
  832. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  833. {"LimitsEnabled",true};
  834. {"UpperAngle",5};
  835. })
  836. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  837. {"LimitsEnabled",true};
  838. {"UpperAngle",15};
  839. })
  840.  
  841. local handProperties = {
  842. {"LimitsEnabled", true};
  843. {"UpperAngle",0};
  844. {"LowerAngle",0};
  845. }
  846. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  847. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  848.  
  849. local shinProperties = {
  850. {"LimitsEnabled", true};
  851. {"UpperAngle", 0};
  852. {"LowerAngle", -75};
  853. }
  854. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  855. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  856.  
  857. local footProperties = {
  858. {"LimitsEnabled", true};
  859. {"UpperAngle", 15};
  860. {"LowerAngle", -45};
  861. }
  862. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  863. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  864.  
  865. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  866. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  867. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  868. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  869. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  870. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  871. end
  872.  
  873. function Ragdoll(Character2,CharTorso)
  874. Character2:BreakJoints()
  875. local hum = Character2:findFirstChild("Humanoid")
  876. hum:remove()
  877. local function Scan(ch)
  878. local e
  879. for e = 1,#ch do
  880. Scan(ch[e]:GetChildren())
  881. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  882. ch[e]:remove()
  883. end
  884. end
  885. end
  886. local NEWHUM = IT("Humanoid")
  887. NEWHUM.Name = "Corpse"
  888. NEWHUM.Health = 0
  889. NEWHUM.MaxHealth = 0
  890. NEWHUM.PlatformStand = true
  891. NEWHUM.Parent = Character2
  892. NEWHUM.DisplayDistanceType = "None"
  893.  
  894. local ch = Character2:GetChildren()
  895. local i
  896. for i = 1,#ch do
  897. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  898. ch[i]:remove()
  899. end
  900. end
  901.  
  902. local Torso2 = Character2.Torso
  903. local movevector = Vector3.new()
  904.  
  905. if Torso2 then
  906. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  907. local Head = Character2:FindFirstChild("Head")
  908. if Head then
  909. local Neck = Instance.new("Weld")
  910. Neck.Name = "Neck"
  911. Neck.Part0 = Torso2
  912. Neck.Part1 = Head
  913. Neck.C0 = CFrame.new(0, 1.5, 0)
  914. Neck.C1 = CFrame.new()
  915. Neck.Parent = Torso2
  916.  
  917. end
  918. local Limb = Character2:FindFirstChild("Right Arm")
  919. if Limb then
  920.  
  921. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  922. local Joint = Instance.new("Glue")
  923. Joint.Name = "RightShoulder"
  924. Joint.Part0 = Torso2
  925. Joint.Part1 = Limb
  926. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  927. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  928. Joint.Parent = Torso2
  929.  
  930. local B = Instance.new("Part")
  931. B.TopSurface = 0
  932. B.BottomSurface = 0
  933. B.formFactor = "Symmetric"
  934. B.Size = Vector3.new(1, 1, 1)
  935. B.Transparency = 1
  936. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  937. B.Parent = Character2
  938. local W = Instance.new("Weld")
  939. W.Part0 = Limb
  940. W.Part1 = B
  941. W.C0 = CFrame.new(0, -0.5, 0)
  942. W.Parent = Limb
  943.  
  944. end
  945. local Limb = Character2:FindFirstChild("Left Arm")
  946. if Limb then
  947.  
  948. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  949. local Joint = Instance.new("Glue")
  950. Joint.Name = "LeftShoulder"
  951. Joint.Part0 = Torso2
  952. Joint.Part1 = Limb
  953. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  954. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  955. Joint.Parent = Torso2
  956.  
  957. local B = Instance.new("Part")
  958. B.TopSurface = 0
  959. B.BottomSurface = 0
  960. B.formFactor = "Symmetric"
  961. B.Size = Vector3.new(1, 1, 1)
  962. B.Transparency = 1
  963. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  964. B.Parent = Character2
  965. local W = Instance.new("Weld")
  966. W.Part0 = Limb
  967. W.Part1 = B
  968. W.C0 = CFrame.new(0, -0.5, 0)
  969. W.Parent = Limb
  970.  
  971. end
  972. local Limb = Character2:FindFirstChild("Right Leg")
  973. if Limb then
  974.  
  975. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  976. local Joint = Instance.new("Glue")
  977. Joint.Name = "RightHip"
  978. Joint.Part0 = Torso2
  979. Joint.Part1 = Limb
  980. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  981. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  982. Joint.Parent = Torso2
  983.  
  984. local B = Instance.new("Part")
  985. B.TopSurface = 0
  986. B.BottomSurface = 0
  987. B.formFactor = "Symmetric"
  988. B.Size = Vector3.new(1, 1, 1)
  989. B.Transparency = 1
  990. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  991. B.Parent = Character2
  992. local W = Instance.new("Weld")
  993. W.Part0 = Limb
  994. W.Part1 = B
  995. W.C0 = CFrame.new(0, -0.5, 0)
  996. W.Parent = Limb
  997.  
  998. end
  999. local Limb = Character2:FindFirstChild("Left Leg")
  1000. if Limb then
  1001.  
  1002. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  1003. local Joint = Instance.new("Glue")
  1004. Joint.Name = "LeftHip"
  1005. Joint.Part0 = Torso2
  1006. Joint.Part1 = Limb
  1007. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1008. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1009. Joint.Parent = Torso2
  1010.  
  1011. local B = Instance.new("Part")
  1012. B.TopSurface = 0
  1013. B.BottomSurface = 0
  1014. B.formFactor = "Symmetric"
  1015. B.Size = Vector3.new(1, 1, 1)
  1016. B.Transparency = 1
  1017. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1018. B.Parent = Character2
  1019. local W = Instance.new("Weld")
  1020. W.Part0 = Limb
  1021. W.Part1 = B
  1022. W.C0 = CFrame.new(0, -0.5, 0)
  1023. W.Parent = Limb
  1024.  
  1025. end
  1026. --[
  1027. local Bar = Instance.new("Part")
  1028. Bar.TopSurface = 0
  1029. Bar.BottomSurface = 0
  1030. Bar.formFactor = "Symmetric"
  1031. Bar.Size = Vector3.new(1, 1, 1)
  1032. Bar.Transparency = 1
  1033. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  1034. Bar.Parent = Character2
  1035. local Weld = Instance.new("Weld")
  1036. Weld.Part0 = Torso2
  1037. Weld.Part1 = Bar
  1038. Weld.C0 = CFrame.new(0, 0.5, 0)
  1039. Weld.Parent = Torso2
  1040. --]]
  1041. end
  1042. Character2.Parent = workspace
  1043. Debris:AddItem(Character2,5)
  1044.  
  1045. return Character2,Torso2
  1046. end
  1047.  
  1048. we = true
  1049.  
  1050. local le = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "le", VT(0, 0, 0),false)
  1051. local HandleMesh = CreateMesh("SpecialMesh", le, "FileMesh", "0", "0", VT(1,1,1), VT(0,0, 0))
  1052. local Weld = CreateWeldOrSnapOrMotor("Weld", le, LeftArm, le, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1053.  
  1054. local txt = Instance.new("BillboardGui", chara)
  1055. CV="Lime green"
  1056. txt.Adornee = chara.Head
  1057. txt.Name = "_status"
  1058. txt.Size = UDim2.new(2, 0, 1.2, 0)
  1059. txt.StudsOffset = Vector3.new(-9, 8, 0)
  1060. local text = Instance.new("TextLabel", txt)
  1061. text.Size = UDim2.new(10, 0, 7, 0)
  1062. text.FontSize = "Size24"
  1063. text.TextScaled = true
  1064. text.TextTransparency = 0
  1065. text.BackgroundTransparency = 1
  1066. text.TextTransparency = 0
  1067. text.TextStrokeTransparency = 0
  1068. text.Font = "Bodoni"
  1069. text.TextStrokeColor3 = BrickColor.new("Really black").Color
  1070. text.TextColor3 = BrickColor.new("Really black").Color
  1071. text.Text = ""
  1072.  
  1073.  
  1074. function die()
  1075. text.Text = "NO U"
  1076. we = true
  1077. ATTACK = true
  1078. Rooted = true
  1079. CreateSound("1543318456", Head, 10, 1)
  1080. game.Players.LocalPlayer.Character["le"].Touched:connect(function(hit)
  1081. local humanoid = hit.Parent:findFirstChild("Humanoid")
  1082. if we == true then
  1083. humanoid:TakeDamage(10)
  1084. end
  1085. end)
  1086. for i=0, 1, 0.1 / Animation_Speed do
  1087. Swait()
  1088. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1089. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(12), RAD(0), RAD(20)), 0.5 / Animation_Speed)
  1090. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.55, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1091. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.55, 0) * ANGLES(RAD(150), RAD(0), RAD(40)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  1092. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1093. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1094. end
  1095. wait(1)
  1096. we = false
  1097. text.Text = ""
  1098. ATTACK = false
  1099. Rooted = false
  1100. end
  1101.  
  1102. function Taunt()
  1103. ATTACK = true
  1104. local LAUGH = nil
  1105. coroutine.resume(coroutine.create(function()
  1106. repeat
  1107. Swait()
  1108. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0 + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  1109. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1110. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE, -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1111. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1112. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1113. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1114. until LAUGH ~= nil
  1115. repeat
  1116. Swait()
  1117. LAUGH.Parent = Head
  1118. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0+(0.1*LAUGH.PlaybackLoudness/75) + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  1119. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE+(0.1*LAUGH.PlaybackLoudness/55)) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1120. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE+(0.1*LAUGH.PlaybackLoudness/55), -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1121. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE+(0.1*LAUGH.PlaybackLoudness/55), 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1122. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1123. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1124. until LAUGH.Playing == false
  1125. ATTACK = false
  1126. end))
  1127. wait(0.1)
  1128. sick:Stop()
  1129. LAUGH = CreateSound(138085838, Head, 10, 1, false)
  1130. sick:Resume()
  1131. end
  1132.  
  1133.  
  1134.  
  1135.  
  1136. function MouseDown(Mouse)
  1137. end
  1138.  
  1139. function MouseUp(Mouse)
  1140. HOLD = false
  1141. end
  1142.  
  1143. function KeyDown(Key)
  1144. KEYHOLD = true
  1145. if Key == "e" and ATTACK == false then
  1146. die()
  1147.  
  1148. end
  1149. end
  1150.  
  1151. if Key == "q" and ATTACK == false then
  1152. Taunt()
  1153.  
  1154. end
  1155.  
  1156. function KeyUp(Key)
  1157. KEYHOLD = false
  1158. end
  1159.  
  1160. Mouse.Button1Down:connect(function(NEWKEY)
  1161. MouseDown(NEWKEY)
  1162. end)
  1163. Mouse.Button1Up:connect(function(NEWKEY)
  1164. MouseUp(NEWKEY)
  1165. end)
  1166. Mouse.KeyDown:connect(function(NEWKEY)
  1167. KeyDown(NEWKEY)
  1168. end)
  1169. Mouse.KeyUp:connect(function(NEWKEY)
  1170. KeyUp(NEWKEY)
  1171. end)
  1172.  
  1173.  
  1174. Humanoid.Changed:connect(function(Jump)
  1175. if Jump == "Jump" and (Disable_Jump == true) then
  1176. Humanoid.Jump = false
  1177. end
  1178. end)
  1179.  
  1180. while true do
  1181. Swait()
  1182. script.Parent = WEAPONGUI
  1183. ANIMATE.Parent = nil
  1184. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1185. v:Stop();
  1186. end
  1187. SINE = SINE + CHANGE
  1188. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1189. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1190. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1191. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1192. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1193. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1194. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1195. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1196. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1197. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1198. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1199. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1200. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1201. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1202. end
  1203. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1204. ANIM = "Jump"
  1205. if PLAYANIMS == true then
  1206. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1207. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1208. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1209. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1210. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1211. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1212. end
  1213. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1214. ANIM = "Fall"
  1215. if PLAYANIMS == true then
  1216. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1217. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1218. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1219. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1220. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1221. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1222. end
  1223. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1224. ANIM = "Idle"
  1225. if ATTACK == false then
  1226. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.5, -0.5 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(45), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1227. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1228. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1229. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1230. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(45), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1231. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(45), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1232. end
  1233. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1234. ANIM = "Walk"
  1235. if PLAYANIMS == true then
  1236. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1237. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1238. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(170 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0 / Animation_Speed)
  1239. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(170 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0 / Animation_Speed)
  1240. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1241. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1242.  
  1243. end
  1244. end
  1245. end
  1246.  
  1247. if Rooted == false then
  1248. Disable_Jump = false
  1249. Humanoid.WalkSpeed = Speed
  1250. elseif Rooted == true then
  1251. Disable_Jump = true
  1252. Humanoid.WalkSpeed = 0
  1253. end
  1254.  
  1255. Humanoid.Health = Humanoid.Health + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement