memberhero

thing

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