Advertisement
5325325325

Untitled

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