Dark_EccentricYT

Untitled

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