lundofett

Untitled

Dec 30th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.12 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 =
  381. BLOOD.CFram
  382. coroutine.resume(coroutine.create(function()
  383. Swait(75)
  384. while true do
  385. Swait()
  386.  
  387. end
  388. end
  389. end))
  390. end
  391. end
  392. end
  393. end
  394. end
  395.  
  396. function SprayBlood(POSITION,DIRECTION,BloodSize)
  397. local BLOOD =
  398. BLOOD.CFrame =
  399. MakeForm(BLOOD,"Ball")
  400. local bv = Instance.new("BodyVelocity",BLOOD)
  401. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  402. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  403. bv.Name = "MOVE"
  404. Debris:AddItem(bv,0.05)
  405. coroutine.resume(coroutine.create(function()
  406. local HASTOUCHEDGROUND = false
  407. local HIT = BLOOD.Touched:Connect(function(hit)
  408. if hit.Anchored == true then
  409. HASTOUCHEDGROUND = true
  410.  
  411. end
  412. end)
  413. wait(5)
  414. if HASTOUCHEDGROUND == false then
  415. BLOOD:remove()
  416. end
  417. end))
  418. end
  419.  
  420. Debris = game:GetService("Debris")
  421.  
  422. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  423. local DIRECTION = CF(StartPos,EndPos).lookVector
  424. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  425. end
  426.  
  427. function turnto(position)
  428. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  429. end
  430.  
  431. function recurse(root,callback,i)
  432. i= i or 0
  433. for _,v in pairs(root:GetChildren()) do
  434. i = i + 1
  435. callback(i,v)
  436.  
  437. if #v:GetChildren() > 0 then
  438. i = recurse(v,callback,i)
  439. end
  440. end
  441.  
  442. return i
  443. end
  444.  
  445. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  446. attachmentName = attachmentName.."RigAttachment"
  447. local constraint = Instance.new(className.."Constraint")
  448. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  449. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  450. constraint.Name = "RagdollConstraint"..part1.Name
  451.  
  452. for _,propertyData in next,properties or {} do
  453. constraint[propertyData[1]] = propertyData[2]
  454. end
  455.  
  456. constraint.Parent = character
  457. end
  458.  
  459. function getAttachment0(character, attachmentName)
  460. for _,child in next,character:GetChildren() do
  461. local attachment = child:FindFirstChild(attachmentName)
  462. if attachment then
  463. return attachment
  464. end
  465. end
  466. end
  467.  
  468. function R15Ragdoll(character)
  469. recurse(character, function(_,v)
  470. if v:IsA("Attachment") then
  471. v.Axis = Vector3.new(0, 1, 0)
  472. v.SecondaryAxis = Vector3.new(0, 0, 1)
  473. v.Rotation = Vector3.new(0, 0, 0)
  474. end
  475. end)
  476. for _,child in next,character:GetChildren() do
  477. if child:IsA("Accoutrement") then
  478. for _,part in next,child:GetChildren() do
  479. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  480. local attachment1 = part:FindFirstChildOfClass("Attachment")
  481. local attachment0 = getAttachment0(character,attachment1.Name)
  482. if attachment0 and attachment1 then
  483. local constraint = Instance.new("HingeConstraint")
  484. constraint.Attachment0 = attachment0
  485. constraint.Attachment1 = attachment1
  486. constraint.LimitsEnabled = true
  487. constraint.UpperAngle = 0
  488. constraint.LowerAngle = 0
  489. constraint.Parent = character
  490. end
  491. elseif part.Name == "HumanoidRootPart" then
  492. part:remove()
  493. end
  494. end
  495. end
  496. end
  497.  
  498. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  499. {"LimitsEnabled",true};
  500. {"UpperAngle",5};
  501. })
  502. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  503. {"LimitsEnabled",true};
  504. {"UpperAngle",15};
  505. })
  506.  
  507. local handProperties = {
  508. {"LimitsEnabled", true};
  509. {"UpperAngle",0};
  510. {"LowerAngle",0};
  511. }
  512. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  513. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  514.  
  515. local shinProperties = {
  516. {"LimitsEnabled", true};
  517. {"UpperAngle", 0};
  518. {"LowerAngle", -75};
  519. }
  520. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  521. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  522.  
  523. local footProperties = {
  524. {"LimitsEnabled", true};
  525. {"UpperAngle", 15};
  526. {"LowerAngle", -45};
  527. }
  528. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  529. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  530.  
  531. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  532. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  533. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  534. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  535. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  536. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  537. end
  538.  
  539. function Ragdoll(Character2,CharTorso)
  540. Character2:BreakJoints()
  541. local hum = Character2:findFirstChild("Humanoid")
  542. hum:remove()
  543. local function Scan(ch)
  544. local e
  545. for e = 1,#ch do
  546. Scan(ch[e]:GetChildren())
  547. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  548. ch[e]:remove()
  549. end
  550. end
  551. end
  552. local NEWHUM = IT("Humanoid")
  553. NEWHUM.Name = "Corpse"
  554. NEWHUM.Health = 0
  555. NEWHUM.MaxHealth = 0
  556. NEWHUM.PlatformStand = true
  557. NEWHUM.Parent = Character2
  558. NEWHUM.DisplayDistanceType = "None"
  559.  
  560. local ch = Character2:GetChildren()
  561. local i
  562. for i = 1,#ch do
  563. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  564. ch[i]:remove()
  565. end
  566. end
  567.  
  568. local Torso2 = Character2.Torso
  569. local movevector = Vector3.new()
  570.  
  571. if Torso2 then
  572. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  573. local Head = Character2:FindFirstChild("Head")
  574. if Head then
  575. local Neck = Instance.new("Weld")
  576. Neck.Name = "Neck"
  577. Neck.Part0 = Torso2
  578. Neck.Part1 = Head
  579. Neck.C0 = CFrame.new(0, 1.5, 0)
  580. Neck.C1 = CFrame.new()
  581. Neck.Parent = Torso2
  582.  
  583. end
  584. local Limb = Character2:FindFirstChild("Right Arm")
  585. if Limb then
  586.  
  587. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  588. local Joint = Instance.new("Glue")
  589. Joint.Name = "RightShoulder"
  590. Joint.Part0 = Torso2
  591. Joint.Part1 = Limb
  592. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  593. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  594. Joint.Parent = Torso2
  595.  
  596. local B = Instance.new("Part")
  597. B.TopSurface = 0
  598. B.BottomSurface = 0
  599. B.formFactor = "Symmetric"
  600. B.Size = Vector3.new(1, 1, 1)
  601. B.Transparency = 1
  602. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  603. B.Parent = Character2
  604. local W = Instance.new("Weld")
  605. W.Part0 = Limb
  606. W.Part1 = B
  607. W.C0 = CFrame.new(0, -0.5, 0)
  608. W.Parent = Limb
  609.  
  610. end
  611. local Limb = Character2:FindFirstChild("Left Arm")
  612. if Limb then
  613.  
  614. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  615. local Joint = Instance.new("Glue")
  616. Joint.Name = "LeftShoulder"
  617. Joint.Part0 = Torso2
  618. Joint.Part1 = Limb
  619. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  620. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  621. Joint.Parent = Torso2
  622.  
  623. local B = Instance.new("Part")
  624. B.TopSurface = 0
  625. B.BottomSurface = 0
  626. B.formFactor = "Symmetric"
  627. B.Size = Vector3.new(1, 1, 1)
  628. B.Transparency = 1
  629. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  630. B.Parent = Character2
  631. local W = Instance.new("Weld")
  632. W.Part0 = Limb
  633. W.Part1 = B
  634. W.C0 = CFrame.new(0, -0.5, 0)
  635. W.Parent = Limb
  636.  
  637. end
  638. local Limb = Character2:FindFirstChild("Right Leg")
  639. if Limb then
  640.  
  641. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  642. local Joint = Instance.new("Glue")
  643. Joint.Name = "RightHip"
  644. Joint.Part0 = Torso2
  645. Joint.Part1 = Limb
  646. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  647. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  648. Joint.Parent = Torso2
  649.  
  650. local B = Instance.new("Part")
  651. B.TopSurface = 0
  652. B.BottomSurface = 0
  653. B.formFactor = "Symmetric"
  654. B.Size = Vector3.new(1, 1, 1)
  655. B.Transparency = 1
  656. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  657. B.Parent = Character2
  658. local W = Instance.new("Weld")
  659. W.Part0 = Limb
  660. W.Part1 = B
  661. W.C0 = CFrame.new(0, -0.5, 0)
  662. W.Parent = Limb
  663.  
  664. end
  665. local Limb = Character2:FindFirstChild("Left Leg")
  666. if Limb then
  667.  
  668. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  669. local Joint = Instance.new("Glue")
  670. Joint.Name = "LeftHip"
  671. Joint.Part0 = Torso2
  672. Joint.Part1 = Limb
  673. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  674. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  675. Joint.Parent = Torso2
  676.  
  677. local B = Instance.new("Part")
  678. B.TopSurface = 0
  679. B.BottomSurface = 0
  680. B.formFactor = "Symmetric"
  681. B.Size = Vector3.new(1, 1, 1)
  682. B.Transparency = 1
  683. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  684. B.Parent = Character2
  685. local W = Instance.new("Weld")
  686. W.Part0 = Limb
  687. W.Part1 = B
  688. W.C0 = CFrame.new(0, -0.5, 0)
  689. W.Parent = Limb
  690.  
  691. end
  692. --[
  693. local Bar = Instance.new("Part")
  694. Bar.TopSurface = 0
  695. Bar.BottomSurface = 0
  696. Bar.formFactor = "Symmetric"
  697. Bar.Size = Vector3.new(1, 1, 1)
  698. Bar.Transparency = 1
  699. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  700. Bar.Parent = Character2
  701. local Weld = Instance.new("Weld")
  702. Weld.Part0 = Torso2
  703. Weld.Part1 = Bar
  704. Weld.C0 = CFrame.new(0, 0.5, 0)
  705. Weld.Parent = Torso2
  706. --]]
  707. end
  708. Character2.Parent = workspace
  709. Debris:AddItem(Character2,5)
  710.  
  711. return Character2,Torso2
  712. end
  713.  
  714. --//=================================\\
  715. --|| WEAPON CREATION
  716. --\\=================================//
  717.  
  718. local Knife = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,1.2,0.2),false)
  719. 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))
  720. CreateMesh("SpecialMesh", Knife, "FileMesh", "470094777", "470149026", VT(0.2,0.2,0.2), VT(0,0,0))
  721. local A = IT("Attachment",Knife)
  722. A.Position = VT(-0, 0.2, 0.136)
  723. local B = IT("Attachment",Knife)
  724. B.Position = VT(-0, -0.95, -0.982)
  725. local Trail = IT("Trail",Knife)
  726. Trail.Attachment0 = B
  727. Trail.Attachment1 = A
  728. Trail.Lifetime = 0.1
  729. Trail.Transparency = NumberSequence.new(0.5, 1)
  730. Trail.Texture = "http://www.roblox.com/asset/?id=1472703539"
  731. Trail.Enabled = true
  732. Humanoid.DisplayDistanceType = "None"
  733. Humanoid.MaxHealth = 800
  734. Humanoid.Health = 800
  735.  
  736. local STEP = CreateSound(131436155, Torso, 3, 1, true)
  737. STEP.Playing = false
  738. STEP.Looped = false
  739. local STEPPING = false
  740. Humanoid.Running:Connect(function(speed)
  741. if STEPPING == false then
  742. STEPPING = true
  743. repeat
  744. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  745. wait(8/TORSOVELOCITY)
  746. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  747. if TORSOVELOCITY > 1 and Torso.Transparency ~= 1 and HITFLOOR ~= nil then
  748. STEP.Parent = Torso
  749. STEP.Pitch = MRANDOM(8,12)/10
  750. STEP:Play()
  751. end
  752. until TORSOVELOCITY < 0.6
  753. STEPPING = false
  754. end
  755. end)
  756.  
  757. for _, c in pairs(Weapon:GetChildren()) do
  758. if c.ClassName == "Part" then
  759. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  760. end
  761. end
  762.  
  763. local SKILLTEXTCOLOR = C3(0,0,0)
  764. local SKILLFONT = "SciFi"
  765. local SKILLTEXTSIZE = 7
  766.  
  767. Weapon.Parent = Character
  768.  
  769. Humanoid.Died:connect(function()
  770. ATTACK = true
  771. end)
  772.  
  773. --//=================================\\
  774. --|| DAMAGE FUNCTIONS
  775. --\\=================================//
  776.  
  777. function StatLabel(CFRAME, TEXT, COLOR)
  778. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  779. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  780. local BODYGYRO = IT("BodyGyro", STATPART)
  781. game:GetService("Debris"):AddItem(STATPART ,5)
  782. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  783. BILLBOARDGUI.Adornee = STATPART
  784. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  785. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  786. BILLBOARDGUI.AlwaysOnTop = false
  787. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  788. TEXTLABEL.BackgroundTransparency = 1
  789. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  790. TEXTLABEL.Text = TEXT
  791. TEXTLABEL.Font = SKILLFONT
  792. TEXTLABEL.FontSize="Size42"
  793. TEXTLABEL.TextColor3 = COLOR
  794. TEXTLABEL.TextStrokeTransparency = 0
  795. TEXTLABEL.TextScaled = true
  796. TEXTLABEL.TextWrapped = true
  797. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  798. for i = 1, 50 do
  799. Swait()
  800. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  801. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  802. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  803. end
  804. THEPART.Parent = nil
  805. end),STATPART, TEXTLABEL)
  806. end
  807.  
  808. --//=================================\\
  809. --|| DAMAGING
  810. --\\=================================//
  811.  
  812. function ApplyDamage(Humanoid,Damage,TorsoPart)
  813. local defence = Instance.new("BoolValue",Humanoid.Parent)
  814. defence.Name = ("HitBy"..Player.Name)
  815. game:GetService("Debris"):AddItem(defence, 0.001)
  816. Damage = Damage * DAMAGEMULTIPLIER
  817. if Humanoid.Health ~= 0 then
  818. local CritChance = MRANDOM(1,100)
  819. if Damage > Humanoid.Health then
  820. Damage = math.ceil(Humanoid.Health)
  821. if Damage == 0 then
  822. Damage = 0.1
  823. end
  824. end
  825. Humanoid.Health = Humanoid.Health - Damage
  826. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  827. end
  828. end
  829.  
  830. function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
  831. local CHILDREN = workspace:GetDescendants()
  832. for index, CHILD in pairs(CHILDREN) do
  833. if CHILD.ClassName == "Model" and CHILD ~= Character then
  834. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  835. if HUM then
  836. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  837. if TORSO then
  838. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  839. if INSTAKILL == true then
  840. CHILD:BreakJoints()
  841. else
  842. local DMG = MRANDOM(MINDMG,MAXDMG)
  843. ApplyDamage(HUM,DMG,TORSO)
  844. end
  845. if FLING > 0 then
  846. for _, c in pairs(CHILD:GetChildren()) do
  847. if c:IsA("BasePart") then
  848. local bv = Instance.new("BodyVelocity")
  849. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  850. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  851. bv.Parent = c
  852. Debris:AddItem(bv,0.05)
  853. end
  854. end
  855. end
  856. end
  857. end
  858. end
  859. end
  860. end
  861. end
  862.  
  863. --//=================================\\
  864. --|| ATTACK FUNCTIONS AND STUFF
  865. --\\=================================//
  866.  
  867. function Cloaked()
  868. CLOAKED = true
  869. Speed = 0
  870. local POS = RootPart.Position
  871. local DISTANCE = 99999
  872. for i = 1, 15 do
  873. wait()
  874. for _, c in pairs(Character:GetChildren()) do
  875. if c:IsA("BasePart") and c ~= RootPart then
  876. c.Transparency = c.Transparency + 1/15
  877. elseif c.ClassName == "Accessory" then
  878. c.Handle.Transparency = c.Handle.Transparency + 1/15
  879. end
  880. end
  881. Trail.Transparency = NumberSequence.new(0.5+((i/15)/2), 1)
  882. Knife.Transparency = Knife.Transparency + 1/15
  883. end
  884. Speed = 5
  885. repeat
  886. wait()
  887. DISTANCE = (RootPart.Position - POS).Magnitude
  888. until DISTANCE > 45 or CLOAKED == false
  889. Speed = 0
  890. for i = 1, 15 do
  891. wait()
  892. for _, c in pairs(Character:GetChildren()) do
  893. if c:IsA("BasePart") and c ~= RootPart then
  894. c.Transparency = 1 - i/15
  895. elseif c.ClassName == "Accessory" then
  896. c.Handle.Transparency = 1 - i/15
  897. end
  898. end
  899. Trail.Transparency = NumberSequence.new(1-((0.5/15)*i), 1)
  900. Knife.Transparency = 1 - i/15
  901. end
  902. Speed = 12
  903. CLOAKED = false
  904. end
  905.  
  906. function Attack()
  907. PLAYANIMS = false
  908. ATTACK = true
  909. Rooted = false
  910. local TARGET = nil
  911. Knife.CanCollide = true
  912. local HUMAN = nil
  913. local TORSOPART = nil
  914. local HIT = Knife.Touched:Connect(function(hit)
  915. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  916. local HITBODY = hit.Parent
  917. local HUM = hit.Parent:FindFirstChildOfClass("Humanoid")
  918. local TORSO = HITBODY:FindFirstChild("Torso") or HITBODY:FindFirstChild("UpperTorso")
  919. if TORSO and HUM.Health > 0 then
  920. TARGET = HITBODY
  921. TORSOPART = TORSO
  922. HUMAN = HUM
  923. end
  924. end
  925. end)
  926. for i=0, 0.4, 0.1 / Animation_Speed do
  927. Swait()
  928. if TARGET then
  929. break
  930. end
  931. 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)
  932. 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)
  933. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  934. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  935. 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)
  936. 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)
  937. end
  938. CreateSound(143501853,Knife,2,MRANDOM(8,13)/10,false)
  939. for i=0, 0.5, 0.1 / Animation_Speed do
  940. Swait()
  941. if TARGET then
  942. break
  943. end
  944. 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)
  945. 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)
  946. 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)
  947. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.3) * ANGLES(RAD(90), RAD(0), RAD(35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  948. 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)
  949. 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)
  950. end
  951. Knife.CanCollide = false
  952. if TARGET then
  953. CLOAKED = false
  954. local DISPOSE = false
  955. Rooted = true
  956. coroutine.resume(coroutine.create(function()
  957. repeat
  958. Swait()
  959. if TORSOPART then
  960. TORSOPART.Anchored = true
  961. TORSOPART.CFrame = RootPart.CFrame*CF(0,0,-2.2)
  962. end
  963. until DISPOSE == true
  964. TORSOPART.Anchored = false
  965. end))
  966. for i=0, 0.5, 0.1 / Animation_Speed do
  967. Swait()
  968. 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)
  969. 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)
  970. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  971. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  972. 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)
  973. 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)
  974. end
  975. CreateSound(28144268,Knife,2,MRANDOM(8,13)/10,false)
  976. CreateSound(180083298,TORSOPART,5,MRANDOM(8,13)/10,false)
  977. coroutine.resume(coroutine.create(function()
  978. for i = 1, 750 do
  979. Swait()
  980. if HUMAN and TORSOPART then
  981. if HUMAN.Health > 0 then
  982. 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)
  983. HUMAN.Health = HUMAN.Health - 1
  984. HUMAN.WalkSpeed = MRANDOM(5,45)
  985. else
  986. break
  987. end
  988. else
  989. break
  990. end
  991. end
  992. local SCREAMS = {160718677,337800380}
  993. if HUMAN and TORSOPART then
  994. if HUMAN.Health == 0 then
  995. local HEAD = TORSOPART.Parent:FindFirstChild("Head")
  996. if HEAD then
  997. CreateSound(SCREAMS[MRANDOM(1,#SCREAMS)],HEAD,5,MRANDOM(13,15)/10,false)
  998. local FACE = HEAD:FindFirstChild("face")
  999. if FACE then
  1000. FACE.Texture = "http://www.roblox.com/asset/?id=145854465"
  1001. end
  1002. end
  1003. if TORSOPART.Name == "Torso" then
  1004. Ragdoll(TORSOPART.Parent,Torso)
  1005. elseif TORSOPART.Name == "UpperTorso" then
  1006. R15Ragdoll(TORSOPART.Parent)
  1007. end
  1008. end
  1009. HUMAN.WalkSpeed = 16
  1010. end
  1011. end))
  1012. for i=0, 0.2, 0.1 / Animation_Speed do
  1013. Swait()
  1014. 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)
  1015. 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)
  1016. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1017. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1018. 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)
  1019. 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)
  1020. end
  1021. DISPOSE = true
  1022. local bv = Instance.new("BodyVelocity")
  1023. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1024. bv.velocity = CF(TORSOPART.Position,TORSOPART.CFrame*CF(0,5,-15).p).lookVector*75
  1025. bv.Parent = TORSOPART
  1026. Debris:AddItem(bv,0.05)
  1027. for i=0, 0.5, 0.1 / Animation_Speed do
  1028. Swait()
  1029. 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)
  1030. 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)
  1031. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1032. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1033. 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)
  1034. 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)
  1035. end
  1036. end
  1037. HIT:disconnect()
  1038. ATTACK = false
  1039. Rooted = false
  1040. PLAYANIMS = true
  1041. end
  1042.  
  1043. function Taunt()
  1044. ATTACK = true
  1045. Rooted = true
  1046. PLAYANIMS = false
  1047. CreateSound(159882303,Torso,5,MRANDOM(8,9)/10,false)
  1048. for i=0, 1.5, 0.1 / Animation_Speed do
  1049. Swait()
  1050. 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)
  1051. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(35), RAD(0)), 1 / Animation_Speed)
  1052. 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)
  1053. 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)
  1054. 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)
  1055. 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)
  1056. end
  1057. PLAYANIMS = true
  1058. ATTACK = false
  1059. Rooted = false
  1060. end
  1061.  
  1062. --//=================================\\
  1063. --|| ASSIGN THINGS TO KEYS
  1064. --\\=================================//
  1065.  
  1066. function MouseDown(Mouse)
  1067. HOLD = true
  1068. if ATTACK == false then
  1069. Attack()
  1070. end
  1071. end
  1072.  
  1073. function MouseUp(Mouse)
  1074. HOLD = false
  1075. end
  1076.  
  1077. function KeyDown(Key)
  1078. KEYHOLD = true
  1079. if Key == "z" and ATTACK == false then
  1080. if CLOAKED == false then
  1081. Cloaked()
  1082. else
  1083. CLOAKED = false
  1084. end
  1085. end
  1086.  
  1087. if Key == "t" and ATTACK == false then
  1088. Taunt()
  1089. end
  1090.  
  1091. if string.byte(Key) == 50 and ATTACK == false and CLOAKED == false then
  1092. if Speed == 12 then
  1093. Speed = 30
  1094. elseif Speed == 30 then
  1095. Speed = 12
  1096. end
  1097. end
  1098. end
  1099.  
  1100. function KeyUp(Key)
  1101. KEYHOLD = false
  1102. end
  1103.  
  1104. Mouse.Button1Down:connect(function(NEWKEY)
  1105. MouseDown(NEWKEY)
  1106. end)
  1107. Mouse.Button1Up:connect(function(NEWKEY)
  1108. MouseUp(NEWKEY)
  1109. end)
  1110. Mouse.KeyDown:connect(function(NEWKEY)
  1111. KeyDown(NEWKEY)
  1112. end)
  1113. Mouse.KeyUp:connect(function(NEWKEY)
  1114. KeyUp(NEWKEY)
  1115. end)
  1116.  
  1117. --//=================================\\
  1118. --\\=================================//
  1119.  
  1120. function unanchor()
  1121. if UNANCHOR == true then
  1122. g = Character:GetChildren()
  1123. for i = 1, #g do
  1124. if g[i].ClassName == "Part" then
  1125. g[i].Anchored = false
  1126. end
  1127. end
  1128. end
  1129. end
  1130.  
  1131. --//=================================\\
  1132. --|| WRAP THE WHOLE SCRIPT UP
  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(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1179. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1180. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * 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(0), RAD(0)), 0.15 / Animation_Speed)
  1188. 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)
  1189. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(15), RAD(35), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1190. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * 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(80), 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(-80), 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. if Humanoid.WalkSpeed <= 17 then
  1198. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1199. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1200. 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)
  1201. 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)
  1202. 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)
  1203. 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)
  1204. else
  1205. 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)
  1206. 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)
  1207. 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)
  1208. 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)
  1209. 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)
  1210. 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)
  1211. end
  1212. end
  1213. end
  1214. unanchor()
  1215. if Rooted == false then
  1216. Disable_Jump = false
  1217. Humanoid.WalkSpeed = Speed
  1218. elseif Rooted == true then
  1219. Disable_Jump = true
  1220. Humanoid.WalkSpeed = 0
  1221. end
  1222. if Head:FindFirstChild("face") then
  1223. Head.face:remove()
  1224. elseif Head:FindFirstChildOfClass("Sound") then
  1225. Head:FindFirstChildOfClass("Sound"):remove()
  1226. end
  1227. Humanoid.Health = Humanoid.Health + 1
  1228. end
  1229.  
  1230. --//=================================\\
  1231. --\\=================================//
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237. --//====================================================\\--
  1238. --|| END OF SCRIPT
  1239. --\\====================================================//--
Add Comment
Please, Sign In to add comment