Advertisement
zXzGamePROzXz

Knife And Gun

Jan 26th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros, Edited by StarzoZero")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. --//====================================================\\--
  137. --|| CREATED BY SHACKLUSTER
  138. --\\====================================================//--
  139.  
  140. wait(0.2)
  141.  
  142. Player = game:GetService("Players").LocalPlayer
  143. PlayerGui = Player.PlayerGui
  144. Cam = workspace.CurrentCamera
  145. Backpack = Player.Backpack
  146. Character = Player.Character
  147. Humanoid = Character.Humanoid
  148. Mouse = Player:GetMouse()
  149. RootPart = Character["HumanoidRootPart"]
  150. Torso = Character["Torso"]
  151. Head = Character["Head"]
  152. RightArm = Character["Right Arm"]
  153. LeftArm = Character["Left Arm"]
  154. RightLeg = Character["Right Leg"]
  155. LeftLeg = Character["Left Leg"]
  156. RootJoint = RootPart["RootJoint"]
  157. Neck = Torso["Neck"]
  158. RightShoulder = Torso["Right Shoulder"]
  159. LeftShoulder = Torso["Left Shoulder"]
  160. RightHip = Torso["Right Hip"]
  161. LeftHip = Torso["Left Hip"]
  162.  
  163. IT = Instance.new
  164. CF = CFrame.new
  165. VT = Vector3.new
  166. RAD = math.rad
  167. C3 = Color3.new
  168. UD2 = UDim2.new
  169. BRICKC = BrickColor.new
  170. ANGLES = CFrame.Angles
  171. EULER = CFrame.fromEulerAnglesXYZ
  172. COS = math.cos
  173. ACOS = math.acos
  174. SIN = math.sin
  175. ASIN = math.asin
  176. ABS = math.abs
  177. MRANDOM = math.random
  178. FLOOR = math.floor
  179.  
  180. --//=================================\\
  181. --|| USEFUL VALUES
  182. --\\=================================//
  183.  
  184. Animation_Speed = 3
  185. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  186. local Speed = 12
  187. local SIZE = 1
  188. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  189. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  190. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  191. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  192. local DAMAGEMULTIPLIER = 1
  193. local ANIM = "Idle"
  194. local ATTACK = false
  195. local EQUIPPED = false
  196. local HOLD = false
  197. local COMBO = 1
  198. local Rooted = false
  199. local SINE = 0
  200. local KEYHOLD = false
  201. local CHANGE = 2 / Animation_Speed
  202. local WALKINGANIM = false
  203. local VALUE1 = false
  204. local VALUE2 = false
  205. local ROBLOXIDLEANIMATION = IT("Animation")
  206. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  207. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  208. --ROBLOXIDLEANIMATION.Parent = Humanoid
  209. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  210. WEAPONGUI.Name = "Weapon GUI"
  211. local Weapon = IT("Model")
  212. Weapon.Name = "Adds"
  213. local Effects = IT("Folder", Weapon)
  214. Effects.Name = "Effects"
  215. local ANIMATOR = Humanoid.Animator
  216. local ANIMATE = Character.Animate
  217. local UNANCHOR = true
  218. local PLAYANIMS = true
  219. local CLOAKED = false
  220.  
  221. --//=================================\\
  222. --\\=================================//
  223.  
  224.  
  225. --//=================================\\
  226. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  227. --\\=================================//
  228.  
  229. ArtificialHB = Instance.new("BindableEvent", script)
  230. ArtificialHB.Name = "ArtificialHB"
  231.  
  232. script:WaitForChild("ArtificialHB")
  233.  
  234. frame = Frame_Speed
  235. tf = 0
  236. allowframeloss = false
  237. tossremainder = false
  238. lastframe = tick()
  239. script.ArtificialHB:Fire()
  240.  
  241. game:GetService("RunService").Heartbeat:connect(function(s, p)
  242. tf = tf + s
  243. if tf >= frame then
  244. if allowframeloss then
  245. script.ArtificialHB:Fire()
  246. lastframe = tick()
  247. else
  248. for i = 1, math.floor(tf / frame) do
  249. script.ArtificialHB:Fire()
  250. end
  251. lastframe = tick()
  252. end
  253. if tossremainder then
  254. tf = 0
  255. else
  256. tf = tf - frame * math.floor(tf / frame)
  257. end
  258. end
  259. end)
  260.  
  261. --//=================================\\
  262. --\\=================================//
  263.  
  264. --//=================================\\
  265. --|| SOME FUNCTIONS
  266. --\\=================================//
  267.  
  268. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  269. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  270. end
  271.  
  272. function PositiveAngle(NUMBER)
  273. if NUMBER >= 0 then
  274. NUMBER = 0
  275. end
  276. return NUMBER
  277. end
  278.  
  279. function NegativeAngle(NUMBER)
  280. if NUMBER <= 0 then
  281. NUMBER = 0
  282. end
  283. return NUMBER
  284. end
  285.  
  286. function Swait(NUMBER)
  287. if NUMBER == 0 or NUMBER == nil then
  288. ArtificialHB.Event:wait()
  289. else
  290. for i = 1, NUMBER do
  291. ArtificialHB.Event:wait()
  292. end
  293. end
  294. end
  295.  
  296. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  297. local NEWMESH = IT(MESH)
  298. if MESH == "SpecialMesh" then
  299. NEWMESH.MeshType = MESHTYPE
  300. if MESHID ~= "nil" and MESHID ~= "" then
  301. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  302. end
  303. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  304. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  305. end
  306. end
  307. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  308. NEWMESH.Scale = SCALE
  309. NEWMESH.Parent = PARENT
  310. return NEWMESH
  311. end
  312.  
  313. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  314. local NEWPART = IT("Part")
  315. NEWPART.formFactor = FORMFACTOR
  316. NEWPART.Reflectance = REFLECTANCE
  317. NEWPART.Transparency = TRANSPARENCY
  318. NEWPART.CanCollide = false
  319. NEWPART.Locked = true
  320. NEWPART.Anchored = true
  321. if ANCHOR == false then
  322. NEWPART.Anchored = false
  323. end
  324. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  325. NEWPART.Name = NAME
  326. NEWPART.Size = SIZE
  327. NEWPART.Position = Torso.Position
  328. NEWPART.Material = MATERIAL
  329. NEWPART:BreakJoints()
  330. NEWPART.Parent = PARENT
  331. return NEWPART
  332. end
  333.  
  334. local function weldBetween(a, b)
  335. local weldd = Instance.new("ManualWeld")
  336. weldd.Part0 = a
  337. weldd.Part1 = b
  338. weldd.C0 = CFrame.new()
  339. weldd.C1 = b.CFrame:inverse() * a.CFrame
  340. weldd.Parent = a
  341. return weldd
  342. end
  343.  
  344.  
  345. function QuaternionFromCFrame(cf)
  346. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  347. local trace = m00 + m11 + m22
  348. if trace > 0 then
  349. local s = math.sqrt(1 + trace)
  350. local recip = 0.5 / s
  351. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  352. else
  353. local i = 0
  354. if m11 > m00 then
  355. i = 1
  356. end
  357. if m22 > (i == 0 and m00 or m11) then
  358. i = 2
  359. end
  360. if i == 0 then
  361. local s = math.sqrt(m00 - m11 - m22 + 1)
  362. local recip = 0.5 / s
  363. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  364. elseif i == 1 then
  365. local s = math.sqrt(m11 - m22 - m00 + 1)
  366. local recip = 0.5 / s
  367. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  368. elseif i == 2 then
  369. local s = math.sqrt(m22 - m00 - m11 + 1)
  370. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  371. end
  372. end
  373. end
  374.  
  375. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  376. local xs, ys, zs = x + x, y + y, z + z
  377. local wx, wy, wz = w * xs, w * ys, w * zs
  378. local xx = x * xs
  379. local xy = x * ys
  380. local xz = x * zs
  381. local yy = y * ys
  382. local yz = y * zs
  383. local zz = z * zs
  384. 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))
  385. end
  386.  
  387. function QuaternionSlerp(a, b, t)
  388. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  389. local startInterp, finishInterp;
  390. if cosTheta >= 0.0001 then
  391. if (1 - cosTheta) > 0.0001 then
  392. local theta = ACOS(cosTheta)
  393. local invSinTheta = 1 / SIN(theta)
  394. startInterp = SIN((1 - t) * theta) * invSinTheta
  395. finishInterp = SIN(t * theta) * invSinTheta
  396. else
  397. startInterp = 1 - t
  398. finishInterp = t
  399. end
  400. else
  401. if (1 + cosTheta) > 0.0001 then
  402. local theta = ACOS(-cosTheta)
  403. local invSinTheta = 1 / SIN(theta)
  404. startInterp = SIN((t - 1) * theta) * invSinTheta
  405. finishInterp = SIN(t * theta) * invSinTheta
  406. else
  407. startInterp = t - 1
  408. finishInterp = t
  409. end
  410. end
  411. 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
  412. end
  413.  
  414. function Clerp(a, b, t)
  415. local qa = {QuaternionFromCFrame(a)}
  416. local qb = {QuaternionFromCFrame(b)}
  417. local ax, ay, az = a.x, a.y, a.z
  418. local bx, by, bz = b.x, b.y, b.z
  419. local _t = 1 - t
  420. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  421. end
  422.  
  423. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  424. local frame = IT("Frame")
  425. frame.BackgroundTransparency = TRANSPARENCY
  426. frame.BorderSizePixel = BORDERSIZEPIXEL
  427. frame.Position = POSITION
  428. frame.Size = SIZE
  429. frame.BackgroundColor3 = COLOR
  430. frame.BorderColor3 = BORDERCOLOR
  431. frame.Name = NAME
  432. frame.Parent = PARENT
  433. return frame
  434. end
  435.  
  436. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  437. local label = IT("TextLabel")
  438. label.BackgroundTransparency = 1
  439. label.Size = UD2(1, 0, 1, 0)
  440. label.Position = UD2(0, 0, 0, 0)
  441. label.TextColor3 = TEXTCOLOR
  442. label.TextStrokeTransparency = STROKETRANSPARENCY
  443. label.TextTransparency = TRANSPARENCY
  444. label.FontSize = TEXTFONTSIZE
  445. label.Font = TEXTFONT
  446. label.BorderSizePixel = BORDERSIZEPIXEL
  447. label.TextScaled = false
  448. label.Text = TEXT
  449. label.Name = NAME
  450. label.Parent = PARENT
  451. return label
  452. end
  453.  
  454. function NoOutlines(PART)
  455. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  456. end
  457.  
  458. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  459. local NEWWELD = IT(TYPE)
  460. NEWWELD.Part0 = PART0
  461. NEWWELD.Part1 = PART1
  462. NEWWELD.C0 = C0
  463. NEWWELD.C1 = C1
  464. NEWWELD.Parent = PARENT
  465. return NEWWELD
  466. end
  467.  
  468. local S = IT("Sound")
  469. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  470. local NEWSOUND = nil
  471. coroutine.resume(coroutine.create(function()
  472. NEWSOUND = S:Clone()
  473. NEWSOUND.Parent = PARENT
  474. NEWSOUND.Volume = VOLUME
  475. NEWSOUND.Pitch = PITCH
  476. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  477. NEWSOUND:play()
  478. if DOESLOOP == true then
  479. NEWSOUND.Looped = true
  480. else
  481. repeat wait(1) until NEWSOUND.Playing == false
  482. NEWSOUND:remove()
  483. end
  484. end))
  485. return NEWSOUND
  486. end
  487.  
  488. function MakeForm(PART,TYPE)
  489. if TYPE == "Cyl" then
  490. local MSH = IT("CylinderMesh",PART)
  491. elseif TYPE == "Ball" then
  492. local MSH = IT("SpecialMesh",PART)
  493. MSH.MeshType = "Sphere"
  494. elseif TYPE == "Wedge" then
  495. local MSH = IT("SpecialMesh",PART)
  496. MSH.MeshType = "Wedge"
  497. end
  498. end
  499.  
  500. function CFrameFromTopBack(at, top, back)
  501. local right = top:Cross(back)
  502. 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)
  503. end
  504.  
  505. function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
  506. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
  507. if HITFLOOR ~= nil then
  508. if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  509. if HITFLOOR.Name == "BloodPuddle" then
  510. local DIST = (Position - HITFLOOR.Position).Magnitude
  511. 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
  512. HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
  513. end
  514. else
  515. if HITFLOOR.Anchored == true then
  516. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
  517. BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
  518. MakeForm(BLOOD,"Cyl")
  519. coroutine.resume(coroutine.create(function()
  520. Swait(75)
  521. while true do
  522. Swait()
  523. BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
  524. if BLOOD.Size.Z < 0.051 then
  525. BLOOD:remove()
  526. break
  527. end
  528. end
  529. end))
  530. end
  531. end
  532. end
  533. end
  534. end
  535.  
  536. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  537. function WACKYEFFECT(Table)
  538. local TYPE = (Table.EffectType or "Sphere")
  539. local SIZE = (Table.Size or VT(1,1,1))
  540. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  541. local TRANSPARENCY = (Table.Transparency or 0)
  542. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  543. local CFRAME = (Table.CFrame or Torso.CFrame)
  544. local MOVEDIRECTION = (Table.MoveToPos or nil)
  545. local ROTATION1 = (Table.RotationX or 0)
  546. local ROTATION2 = (Table.RotationY or 0)
  547. local ROTATION3 = (Table.RotationZ or 0)
  548. local MATERIAL = (Table.Material or "Neon")
  549. local COLOR = (Table.Color or C3(1,1,1))
  550. local TIME = (Table.Time or 45)
  551. local SOUNDID = (Table.SoundID or nil)
  552. local SOUNDPITCH = (Table.SoundPitch or nil)
  553. local SOUNDVOLUME = (Table.SoundVolume or nil)
  554. coroutine.resume(coroutine.create(function()
  555. local PLAYSSOUND = false
  556. local SOUND = nil
  557. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  558. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  559. PLAYSSOUND = true
  560. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  561. end
  562. EFFECT.Color = COLOR
  563. local MSH = nil
  564. if TYPE == "Sphere" then
  565. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  566. elseif TYPE == "Block" or TYPE == "Box" then
  567. MSH = IT("BlockMesh",EFFECT)
  568. MSH.Scale = SIZE
  569. elseif TYPE == "Wave" then
  570. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  571. elseif TYPE == "Ring" then
  572. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  573. elseif TYPE == "Slash" then
  574. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  575. elseif TYPE == "Round Slash" then
  576. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  577. elseif TYPE == "Swirl" then
  578. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  579. elseif TYPE == "Skull" then
  580. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  581. elseif TYPE == "Crystal" then
  582. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  583. end
  584. if MSH ~= nil then
  585. local MOVESPEED = nil
  586. if MOVEDIRECTION ~= nil then
  587. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  588. end
  589. local GROWTH = SIZE - ENDSIZE
  590. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  591. if TYPE == "Block" then
  592. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  593. else
  594. EFFECT.CFrame = CFRAME
  595. end
  596. for LOOP = 1, TIME+1 do
  597. Swait()
  598. MSH.Scale = MSH.Scale - GROWTH/TIME
  599. if TYPE == "Wave" then
  600. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  601. end
  602. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  603. if TYPE == "Block" then
  604. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  605. else
  606. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  607. end
  608. if MOVEDIRECTION ~= nil then
  609. local ORI = EFFECT.Orientation
  610. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  611. EFFECT.Orientation = ORI
  612. end
  613. end
  614. if PLAYSSOUND == false then
  615. EFFECT:remove()
  616. else
  617. repeat wait(1) until SOUND.Playing == false
  618. EFFECT:remove()
  619. end
  620. else
  621. if PLAYSSOUND == false then
  622. EFFECT:remove()
  623. else
  624. repeat Swait() until SOUND.Playing == false
  625. EFFECT:remove()
  626. end
  627. end
  628. end))
  629. end
  630.  
  631. function SprayBlood(POSITION,DIRECTION,BloodSize)
  632. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
  633. BLOOD.CFrame = CF(POSITION)
  634. MakeForm(BLOOD,"Ball")
  635. local bv = Instance.new("BodyVelocity",BLOOD)
  636. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  637. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  638. bv.Name = "MOVE"
  639. Debris:AddItem(bv,0.05)
  640. coroutine.resume(coroutine.create(function()
  641. local HASTOUCHEDGROUND = false
  642. local HIT = BLOOD.Touched:Connect(function(hit)
  643. if hit.Anchored == true then
  644. HASTOUCHEDGROUND = true
  645. PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
  646. end
  647. end)
  648. wait(5)
  649. if HASTOUCHEDGROUND == false then
  650. BLOOD:remove()
  651. end
  652. end))
  653. end
  654.  
  655. Debris = game:GetService("Debris")
  656.  
  657. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  658. local DIRECTION = CF(StartPos,EndPos).lookVector
  659. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  660. end
  661.  
  662. function turnto(position)
  663. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  664. end
  665.  
  666. function recurse(root,callback,i)
  667. i= i or 0
  668. for _,v in pairs(root:GetChildren()) do
  669. i = i + 1
  670. callback(i,v)
  671.  
  672. if #v:GetChildren() > 0 then
  673. i = recurse(v,callback,i)
  674. end
  675. end
  676.  
  677. return i
  678. end
  679.  
  680. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  681. attachmentName = attachmentName.."RigAttachment"
  682. local constraint = Instance.new(className.."Constraint")
  683. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  684. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  685. constraint.Name = "RagdollConstraint"..part1.Name
  686.  
  687. for _,propertyData in next,properties or {} do
  688. constraint[propertyData[1]] = propertyData[2]
  689. end
  690.  
  691. constraint.Parent = character
  692. end
  693.  
  694. function getAttachment0(character, attachmentName)
  695. for _,child in next,character:GetChildren() do
  696. local attachment = child:FindFirstChild(attachmentName)
  697. if attachment then
  698. return attachment
  699. end
  700. end
  701. end
  702.  
  703. function R15Ragdoll(character)
  704. recurse(character, function(_,v)
  705. if v:IsA("Attachment") then
  706. v.Axis = Vector3.new(0, 1, 0)
  707. v.SecondaryAxis = Vector3.new(0, 0, 1)
  708. v.Rotation = Vector3.new(0, 0, 0)
  709. end
  710. end)
  711. for _,child in next,character:GetChildren() do
  712. if child:IsA("Accoutrement") then
  713. for _,part in next,child:GetChildren() do
  714. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  715. local attachment1 = part:FindFirstChildOfClass("Attachment")
  716. local attachment0 = getAttachment0(character,attachment1.Name)
  717. if attachment0 and attachment1 then
  718. local constraint = Instance.new("HingeConstraint")
  719. constraint.Attachment0 = attachment0
  720. constraint.Attachment1 = attachment1
  721. constraint.LimitsEnabled = true
  722. constraint.UpperAngle = 0
  723. constraint.LowerAngle = 0
  724. constraint.Parent = character
  725. end
  726. elseif part.Name == "HumanoidRootPart" then
  727. part:remove()
  728. end
  729. end
  730. end
  731. end
  732.  
  733. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  734. {"LimitsEnabled",true};
  735. {"UpperAngle",5};
  736. })
  737. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  738. {"LimitsEnabled",true};
  739. {"UpperAngle",15};
  740. })
  741.  
  742. local handProperties = {
  743. {"LimitsEnabled", true};
  744. {"UpperAngle",0};
  745. {"LowerAngle",0};
  746. }
  747. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  748. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  749.  
  750. local shinProperties = {
  751. {"LimitsEnabled", true};
  752. {"UpperAngle", 0};
  753. {"LowerAngle", -75};
  754. }
  755. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  756. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  757.  
  758. local footProperties = {
  759. {"LimitsEnabled", true};
  760. {"UpperAngle", 15};
  761. {"LowerAngle", -45};
  762. }
  763. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  764. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  765.  
  766. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  767. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  768. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  769. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  770. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  771. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  772. end
  773.  
  774. function Ragdoll(Character2,CharTorso)
  775. Character2:BreakJoints()
  776. local hum = Character2:findFirstChild("Humanoid")
  777. hum:remove()
  778. local function Scan(ch)
  779. local e
  780. for e = 1,#ch do
  781. Scan(ch[e]:GetChildren())
  782. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  783. ch[e]:remove()
  784. end
  785. end
  786. end
  787. local NEWHUM = IT("Humanoid")
  788. NEWHUM.Name = "Corpse"
  789. NEWHUM.Health = 0
  790. NEWHUM.MaxHealth = 0
  791. NEWHUM.PlatformStand = true
  792. NEWHUM.Parent = Character2
  793. NEWHUM.DisplayDistanceType = "None"
  794.  
  795. local ch = Character2:GetChildren()
  796. local i
  797. for i = 1,#ch do
  798. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  799. ch[i]:remove()
  800. end
  801. end
  802.  
  803. local Torso2 = Character2.Torso
  804. local movevector = Vector3.new()
  805.  
  806. if Torso2 then
  807. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  808. local Head = Character2:FindFirstChild("Head")
  809. if Head then
  810. local Neck = Instance.new("Weld")
  811. Neck.Name = "Neck"
  812. Neck.Part0 = Torso2
  813. Neck.Part1 = Head
  814. Neck.C0 = CFrame.new(0, 1.5, 0)
  815. Neck.C1 = CFrame.new()
  816. Neck.Parent = Torso2
  817.  
  818. end
  819. local Limb = Character2:FindFirstChild("Right Arm")
  820. if Limb then
  821.  
  822. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  823. local Joint = Instance.new("Glue")
  824. Joint.Name = "RightShoulder"
  825. Joint.Part0 = Torso2
  826. Joint.Part1 = Limb
  827. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  828. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  829. Joint.Parent = Torso2
  830.  
  831. local B = Instance.new("Part")
  832. B.TopSurface = 0
  833. B.BottomSurface = 0
  834. B.formFactor = "Symmetric"
  835. B.Size = Vector3.new(1, 1, 1)
  836. B.Transparency = 1
  837. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  838. B.Parent = Character2
  839. local W = Instance.new("Weld")
  840. W.Part0 = Limb
  841. W.Part1 = B
  842. W.C0 = CFrame.new(0, -0.5, 0)
  843. W.Parent = Limb
  844.  
  845. end
  846. local Limb = Character2:FindFirstChild("Left Arm")
  847. if Limb then
  848.  
  849. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  850. local Joint = Instance.new("Glue")
  851. Joint.Name = "LeftShoulder"
  852. Joint.Part0 = Torso2
  853. Joint.Part1 = Limb
  854. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  855. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  856. Joint.Parent = Torso2
  857.  
  858. local B = Instance.new("Part")
  859. B.TopSurface = 0
  860. B.BottomSurface = 0
  861. B.formFactor = "Symmetric"
  862. B.Size = Vector3.new(1, 1, 1)
  863. B.Transparency = 1
  864. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  865. B.Parent = Character2
  866. local W = Instance.new("Weld")
  867. W.Part0 = Limb
  868. W.Part1 = B
  869. W.C0 = CFrame.new(0, -0.5, 0)
  870. W.Parent = Limb
  871.  
  872. end
  873. local Limb = Character2:FindFirstChild("Right Leg")
  874. if Limb then
  875.  
  876. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  877. local Joint = Instance.new("Glue")
  878. Joint.Name = "RightHip"
  879. Joint.Part0 = Torso2
  880. Joint.Part1 = Limb
  881. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  882. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  883. Joint.Parent = Torso2
  884.  
  885. local B = Instance.new("Part")
  886. B.TopSurface = 0
  887. B.BottomSurface = 0
  888. B.formFactor = "Symmetric"
  889. B.Size = Vector3.new(1, 1, 1)
  890. B.Transparency = 1
  891. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  892. B.Parent = Character2
  893. local W = Instance.new("Weld")
  894. W.Part0 = Limb
  895. W.Part1 = B
  896. W.C0 = CFrame.new(0, -0.5, 0)
  897. W.Parent = Limb
  898.  
  899. end
  900. local Limb = Character2:FindFirstChild("Left Leg")
  901. if Limb then
  902.  
  903. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  904. local Joint = Instance.new("Glue")
  905. Joint.Name = "LeftHip"
  906. Joint.Part0 = Torso2
  907. Joint.Part1 = Limb
  908. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  909. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  910. Joint.Parent = Torso2
  911.  
  912. local B = Instance.new("Part")
  913. B.TopSurface = 0
  914. B.BottomSurface = 0
  915. B.formFactor = "Symmetric"
  916. B.Size = Vector3.new(1, 1, 1)
  917. B.Transparency = 1
  918. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  919. B.Parent = Character2
  920. local W = Instance.new("Weld")
  921. W.Part0 = Limb
  922. W.Part1 = B
  923. W.C0 = CFrame.new(0, -0.5, 0)
  924. W.Parent = Limb
  925.  
  926. end
  927. --[
  928. local Bar = Instance.new("Part")
  929. Bar.TopSurface = 0
  930. Bar.BottomSurface = 0
  931. Bar.formFactor = "Symmetric"
  932. Bar.Size = Vector3.new(1, 1, 1)
  933. Bar.Transparency = 1
  934. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  935. Bar.Parent = Character2
  936. local Weld = Instance.new("Weld")
  937. Weld.Part0 = Torso2
  938. Weld.Part1 = Bar
  939. Weld.C0 = CFrame.new(0, 0.5, 0)
  940. Weld.Parent = Torso2
  941. --]]
  942. end
  943. Character2.Parent = workspace
  944. Debris:AddItem(Character2,5)
  945.  
  946. return Character2,Torso2
  947. end
  948.  
  949. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  950. function WACKYEFFECT(Table)
  951. local TYPE = (Table.EffectType or "Sphere")
  952. local SIZE = (Table.Size or VT(1,1,1))
  953. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  954. local TRANSPARENCY = (Table.Transparency or 0)
  955. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  956. local CFRAME = (Table.CFrame or Torso.CFrame)
  957. local MOVEDIRECTION = (Table.MoveToPos or nil)
  958. local ROTATION1 = (Table.RotationX or 0)
  959. local ROTATION2 = (Table.RotationY or 0)
  960. local ROTATION3 = (Table.RotationZ or 0)
  961. local MATERIAL = (Table.Material or "Neon")
  962. local COLOR = (Table.Color or C3(1,1,1))
  963. local TIME = (Table.Time or 45)
  964. local SOUNDID = (Table.SoundID or nil)
  965. local SOUNDPITCH = (Table.SoundPitch or nil)
  966. local SOUNDVOLUME = (Table.SoundVolume or nil)
  967. coroutine.resume(coroutine.create(function()
  968. local PLAYSSOUND = false
  969. local SOUND = nil
  970. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  971. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  972. PLAYSSOUND = true
  973. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  974. end
  975. EFFECT.Color = COLOR
  976. local MSH = nil
  977. if TYPE == "Sphere" then
  978. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  979. elseif TYPE == "Block" or TYPE == "Box" then
  980. MSH = IT("BlockMesh",EFFECT)
  981. MSH.Scale = SIZE
  982. elseif TYPE == "Wave" then
  983. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  984. elseif TYPE == "Ring" then
  985. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  986. elseif TYPE == "Slash" then
  987. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  988. elseif TYPE == "Round Slash" then
  989. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  990. elseif TYPE == "Swirl" then
  991. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  992. elseif TYPE == "Skull" then
  993. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  994. elseif TYPE == "Crystal" then
  995. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  996. end
  997. if MSH ~= nil then
  998. local MOVESPEED = nil
  999. if MOVEDIRECTION ~= nil then
  1000. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1001. end
  1002. local GROWTH = SIZE - ENDSIZE
  1003. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1004. if TYPE == "Block" then
  1005. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1006. else
  1007. EFFECT.CFrame = CFRAME
  1008. end
  1009. for LOOP = 1, TIME+1 do
  1010. Swait()
  1011. MSH.Scale = MSH.Scale - GROWTH/TIME
  1012. if TYPE == "Wave" then
  1013. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1014. end
  1015. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1016. if TYPE == "Block" then
  1017. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1018. else
  1019. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1020. end
  1021. if MOVEDIRECTION ~= nil then
  1022. local ORI = EFFECT.Orientation
  1023. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1024. EFFECT.Orientation = ORI
  1025. end
  1026. end
  1027. if PLAYSSOUND == false then
  1028. EFFECT:remove()
  1029. else
  1030. repeat Swait() until SOUND.Playing == false
  1031. EFFECT:remove()
  1032. end
  1033. else
  1034. if PLAYSSOUND == false then
  1035. EFFECT:remove()
  1036. else
  1037. repeat Swait() until SOUND.Playing == false
  1038. EFFECT:remove()
  1039. end
  1040. end
  1041. end))
  1042. end
  1043.  
  1044. --//=================================\\
  1045. --|| WEAPON CREATION
  1046. --\\=================================//
  1047.  
  1048. local BMUSIC = IT("Sound",RootPart)
  1049. local VOLUME = 0.8
  1050. local PITCH = 0.8
  1051. local SONGID = 521970657
  1052. local A = IT("Attachment",Torso)
  1053.  
  1054. local GUN = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Gun", VT(1, 0.8, 3),false)
  1055. CreateMesh("SpecialMesh", GUN, "FileMesh", "623102664", "623102879", VT(0.01, 0.01, 0.01), VT(0,0,0))
  1056. local GUNWELD = CreateWeldOrSnapOrMotor("Weld", GUN, Torso, GUN, CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
  1057.  
  1058. local Knife = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,1.2,0.2),false)
  1059. 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))
  1060. CreateMesh("SpecialMesh", Knife, "FileMesh", "470094777", "470149026", VT(0.2,0.2,0.2), VT(0,0,0))
  1061. local A = IT("Attachment",Knife)
  1062. A.Position = VT(-0, 0.2, 0.136)
  1063. local B = IT("Attachment",Knife)
  1064. B.Position = VT(-0, -0.95, -0.982)
  1065. local Trail = IT("Trail",Knife)
  1066. Trail.Attachment0 = B
  1067. Trail.Attachment1 = A
  1068. Trail.Lifetime = 0.1
  1069. Trail.Transparency = NumberSequence.new(0.5, 1)
  1070. Trail.Texture = "http://www.roblox.com/asset/?id=1472703539"
  1071. Trail.Enabled = true
  1072. Humanoid.DisplayDistanceType = "None"
  1073. Humanoid.MaxHealth = 800
  1074. Humanoid.Health = 800
  1075.  
  1076. local STEP = CreateSound(131436155, Torso, 3, 1, true)
  1077. STEP.Playing = false
  1078. STEP.Looped = false
  1079. local STEPPING = false
  1080. Humanoid.Running:Connect(function(speed)
  1081. if STEPPING == false then
  1082. STEPPING = true
  1083. repeat
  1084. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1085. wait(8/TORSOVELOCITY)
  1086. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1087. if TORSOVELOCITY > 1 and Torso.Transparency ~= 1 and HITFLOOR ~= nil then
  1088. STEP.Parent = Torso
  1089. STEP.Pitch = MRANDOM(8,12)/10
  1090. STEP:Play()
  1091. end
  1092. until TORSOVELOCITY < 0.6
  1093. STEPPING = false
  1094. end
  1095. end)
  1096.  
  1097. for _, c in pairs(Weapon:GetChildren()) do
  1098. if c.ClassName == "Part" then
  1099. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1100. end
  1101. end
  1102.  
  1103. local SKILLTEXTCOLOR = C3(0,0,0)
  1104. local SKILLFONT = "SciFi"
  1105. local SKILLTEXTSIZE = 7
  1106.  
  1107. Weapon.Parent = Character
  1108.  
  1109. Humanoid.Died:connect(function()
  1110. ATTACK = true
  1111. end)
  1112.  
  1113. --//=================================\\
  1114. --|| DAMAGE FUNCTIONS
  1115. --\\=================================//
  1116.  
  1117. function StatLabel(CFRAME, TEXT, COLOR)
  1118. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  1119. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  1120. local BODYGYRO = IT("BodyGyro", STATPART)
  1121. game:GetService("Debris"):AddItem(STATPART ,5)
  1122. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  1123. BILLBOARDGUI.Adornee = STATPART
  1124. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  1125. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  1126. BILLBOARDGUI.AlwaysOnTop = false
  1127. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  1128. TEXTLABEL.BackgroundTransparency = 1
  1129. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  1130. TEXTLABEL.Text = TEXT
  1131. TEXTLABEL.Font = SKILLFONT
  1132. TEXTLABEL.FontSize="Size42"
  1133. TEXTLABEL.TextColor3 = COLOR
  1134. TEXTLABEL.TextStrokeTransparency = 0
  1135. TEXTLABEL.TextScaled = true
  1136. TEXTLABEL.TextWrapped = true
  1137. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  1138. for i = 1, 50 do
  1139. Swait()
  1140. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  1141. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  1142. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  1143. end
  1144. THEPART.Parent = nil
  1145. end),STATPART, TEXTLABEL)
  1146. end
  1147.  
  1148. --//=================================\\
  1149. --|| DAMAGING
  1150. --\\=================================//
  1151.  
  1152. function CameraEnshaking(Length, Intensity)
  1153. coroutine.resume(coroutine.create(function()
  1154. local intensity = 1 * Intensity
  1155. local rotM = 0.01 * Intensity
  1156. for i = 0, Length, 0.1 do
  1157. Swait()
  1158. intensity = intensity - 0.05 * Intensity / Length
  1159. rotM = rotM - 5.0E-4 * Intensity / Length
  1160. hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)))
  1161. cam.CFrame = cam.CFrame * CF(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) * Euler(Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM)
  1162. end
  1163. hum.CameraOffset = Vector3.new(0, 0, 0)
  1164. end))
  1165. end
  1166.  
  1167. function ApplyDamage(Humanoid,Damage,TorsoPart)
  1168. local defence = Instance.new("BoolValue",Humanoid.Parent)
  1169. defence.Name = ("HitBy"..Player.Name)
  1170. game:GetService("Debris"):AddItem(defence, 0.001)
  1171. Damage = Damage * DAMAGEMULTIPLIER
  1172. if Humanoid.Health ~= 0 then
  1173. local CritChance = MRANDOM(1,100)
  1174. if Damage > Humanoid.Health then
  1175. Damage = math.ceil(Humanoid.Health)
  1176. if Damage == 0 then
  1177. Damage = 0.1
  1178. end
  1179. end
  1180. Humanoid.Health = Humanoid.Health - Damage
  1181. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  1182. end
  1183. end
  1184.  
  1185. function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
  1186. local CHILDREN = workspace:GetDescendants()
  1187. for index, CHILD in pairs(CHILDREN) do
  1188. if CHILD.ClassName == "Model" and CHILD ~= Character then
  1189. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  1190. if HUM then
  1191. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  1192. if TORSO then
  1193. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  1194. if INSTAKILL == true then
  1195. CHILD:BreakJoints()
  1196. else
  1197. local DMG = MRANDOM(MINDMG,MAXDMG)
  1198. ApplyDamage(HUM,DMG,TORSO)
  1199. end
  1200. if FLING > 0 then
  1201. for _, c in pairs(CHILD:GetChildren()) do
  1202. if c:IsA("BasePart") then
  1203. local bv = Instance.new("BodyVelocity")
  1204. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1205. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  1206. bv.Parent = c
  1207. Debris:AddItem(bv,0.05)
  1208. end
  1209. end
  1210. end
  1211. end
  1212. end
  1213. end
  1214. end
  1215. end
  1216. end
  1217.  
  1218. function ApplyDamages(Humanoid,Damage)
  1219. Damage = Damage * DAMAGEMULTIPLIER
  1220. local DEAD = false
  1221. if Humanoid.Health < 2000 then
  1222. if Humanoid.Health - Damage > 0 then
  1223. Humanoid.Health = Humanoid.Health - Damage
  1224. else
  1225. DEAD = true
  1226. Humanoid.Parent:BreakJoints()
  1227. end
  1228. else
  1229. DEAD = true
  1230. Humanoid.Parent:BreakJoints()
  1231. end
  1232. end
  1233.  
  1234. --//=================================\\
  1235. --|| ATTACK FUNCTIONS AND STUFF
  1236. --\\=================================//
  1237.  
  1238. function Cloaked()
  1239. CLOAKED = true
  1240. Speed = 0
  1241. local POS = RootPart.Position
  1242. local DISTANCE = 99999
  1243. for i = 1, 15 do
  1244. wait()
  1245. for _, c in pairs(Character:GetChildren()) do
  1246. if c:IsA("BasePart") and c ~= RootPart then
  1247. c.Transparency = c.Transparency + 1/15
  1248. elseif c.ClassName == "Accessory" then
  1249. c.Handle.Transparency = c.Handle.Transparency + 1/15
  1250. end
  1251. end
  1252. Trail.Transparency = NumberSequence.new(0.5+((i/15)/2), 1)
  1253. Knife.Transparency = Knife.Transparency + 1/15
  1254. end
  1255. Speed = 5
  1256. repeat
  1257. wait()
  1258. DISTANCE = (RootPart.Position - POS).Magnitude
  1259. until DISTANCE > 45 or CLOAKED == false
  1260. Speed = 0
  1261. for i = 1, 15 do
  1262. wait()
  1263. for _, c in pairs(Character:GetChildren()) do
  1264. if c:IsA("BasePart") and c ~= RootPart then
  1265. c.Transparency = 1 - i/15
  1266. elseif c.ClassName == "Accessory" then
  1267. c.Handle.Transparency = 1 - i/15
  1268. end
  1269. end
  1270. Trail.Transparency = NumberSequence.new(1-((0.5/15)*i), 1)
  1271. Knife.Transparency = 1 - i/15
  1272. end
  1273. Speed = 12
  1274. CLOAKED = false
  1275. end
  1276.  
  1277. function Attack()
  1278. PLAYANIMS = false
  1279. ATTACK = true
  1280. Rooted = false
  1281. local TARGET = nil
  1282. Knife.CanCollide = true
  1283. local HUMAN = nil
  1284. local TORSOPART = nil
  1285. local HIT = Knife.Touched:Connect(function(hit)
  1286. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  1287. local HITBODY = hit.Parent
  1288. local HUM = hit.Parent:FindFirstChildOfClass("Humanoid")
  1289. local TORSO = HITBODY:FindFirstChild("Torso") or HITBODY:FindFirstChild("UpperTorso")
  1290. if TORSO and HUM.Health > 0 then
  1291. TARGET = HITBODY
  1292. TORSOPART = TORSO
  1293. HUMAN = HUM
  1294. end
  1295. end
  1296. end)
  1297. for i=0, 0.4, 0.1 / Animation_Speed do
  1298. Swait()
  1299. if TARGET then
  1300. break
  1301. end
  1302. 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)
  1303. 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)
  1304. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1305. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1306. 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)
  1307. 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)
  1308. end
  1309. CreateSound(143501853,Knife,2,MRANDOM(8,13)/10,false)
  1310. for i=0, 0.5, 0.1 / Animation_Speed do
  1311. Swait()
  1312. if TARGET then
  1313. break
  1314. end
  1315. 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)
  1316. 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)
  1317. 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)
  1318. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.3) * ANGLES(RAD(90), RAD(0), RAD(35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1319. 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)
  1320. 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)
  1321. end
  1322. Knife.CanCollide = false
  1323. if TARGET then
  1324. CLOAKED = false
  1325. local DISPOSE = false
  1326. Rooted = true
  1327. coroutine.resume(coroutine.create(function()
  1328. repeat
  1329. Swait()
  1330. if TORSOPART then
  1331. TORSOPART.Anchored = true
  1332. TORSOPART.CFrame = RootPart.CFrame*CF(0,0,-2.2)
  1333. end
  1334. until DISPOSE == true
  1335. TORSOPART.Anchored = false
  1336. end))
  1337. for i=0, 0.5, 0.1 / Animation_Speed do
  1338. Swait()
  1339. 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)
  1340. 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)
  1341. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1342. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1343. 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)
  1344. 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)
  1345. end
  1346. CreateSound(28144268,Knife,2,MRANDOM(8,13)/10,false)
  1347. CreateSound(180083298,TORSOPART,5,MRANDOM(8,13)/10,false)
  1348. coroutine.resume(coroutine.create(function()
  1349. for i = 1, 750 do
  1350. Swait()
  1351. if HUMAN and TORSOPART then
  1352. if HUMAN.Health > 0 then
  1353. 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)
  1354. HUMAN.Health = HUMAN.Health - 1
  1355. HUMAN.WalkSpeed = MRANDOM(5,45)
  1356. else
  1357. break
  1358. end
  1359. else
  1360. break
  1361. end
  1362. end
  1363. local SCREAMS = {160718677,337800380}
  1364. if HUMAN and TORSOPART then
  1365. if HUMAN.Health == 0 then
  1366. local HEAD = TORSOPART.Parent:FindFirstChild("Head")
  1367. if HEAD then
  1368. CreateSound(SCREAMS[MRANDOM(1,#SCREAMS)],HEAD,5,MRANDOM(13,15)/10,false)
  1369. local FACE = HEAD:FindFirstChild("face")
  1370. if FACE then
  1371. FACE.Texture = "http://www.roblox.com/asset/?id=145854465"
  1372. end
  1373. end
  1374. if TORSOPART.Name == "Torso" then
  1375. Ragdoll(TORSOPART.Parent,Torso)
  1376. elseif TORSOPART.Name == "UpperTorso" then
  1377. R15Ragdoll(TORSOPART.Parent)
  1378. end
  1379. end
  1380. HUMAN.WalkSpeed = 16
  1381. end
  1382. end))
  1383. for i=0, 0.2, 0.1 / Animation_Speed do
  1384. Swait()
  1385. 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)
  1386. 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)
  1387. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1388. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1389. 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)
  1390. 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)
  1391. end
  1392. DISPOSE = true
  1393. local bv = Instance.new("BodyVelocity")
  1394. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1395. bv.velocity = CF(TORSOPART.Position,TORSOPART.CFrame*CF(0,5,-15).p).lookVector*75
  1396. bv.Parent = TORSOPART
  1397. Debris:AddItem(bv,0.05)
  1398. for i=0, 0.5, 0.1 / Animation_Speed do
  1399. Swait()
  1400. 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)
  1401. 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)
  1402. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1403. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1404. 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)
  1405. 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)
  1406. end
  1407. end
  1408. HIT:disconnect()
  1409. ATTACK = false
  1410. Rooted = false
  1411. PLAYANIMS = true
  1412. end
  1413.  
  1414. function Taunt()
  1415. ATTACK = true
  1416. Rooted = true
  1417. PLAYANIMS = false
  1418. CreateSound(2062482384,Torso,5,MRANDOM(8,9)/10,false)
  1419. for i=0, 1.5, 0.1 / Animation_Speed do
  1420. Swait()
  1421. 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)
  1422. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(35), RAD(0)), 1 / Animation_Speed)
  1423. 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)
  1424. 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)
  1425. 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)
  1426. 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)
  1427. end
  1428. PLAYANIMS = true
  1429. ATTACK = false
  1430. Rooted = false
  1431. end
  1432.  
  1433. function Silence()
  1434. Speed = 6
  1435. ATTACK = true
  1436. Rooted = false
  1437. local GYRO = IT("BodyGyro",RootPart)
  1438. GYRO.D = 2
  1439. GYRO.P = 20000
  1440. GYRO.MaxTorque = VT(0,4000000,0)
  1441. coroutine.resume(coroutine.create(function()
  1442. repeat
  1443. Swait()
  1444. GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
  1445. until ATTACK == false
  1446. GYRO:Remove()
  1447. end))
  1448. for i=0, 0.2, 0.1 / Animation_Speed do
  1449. Swait()
  1450. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1451. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed)
  1452. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1453. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1454. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1455. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1456. end
  1457. local AMMO = 6
  1458. local FIRING = true
  1459. local SHOOTING = false
  1460. local TIMER = 70
  1461. CreateSound(147722227, GUN, 6, 1.3, false)
  1462. GUNWELD.Part0 = LeftArm
  1463. GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90))
  1464. local MOUSE = Mouse.Button1Down:connect(function(NEWKEY)
  1465. if SHOOTING == false and AMMO > 0 then
  1466. SHOOTING = true
  1467. AMMO = AMMO - 1
  1468. local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p
  1469. local HIT,POS = CastProperRay(GUNPOS,Mouse.Hit.p,1000,Character)
  1470. local DISTANCE = (POS - GUNPOS).Magnitude
  1471. if HIT then
  1472. if HIT.Parent:FindFirstChildOfClass("Humanoid") then
  1473. if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
  1474. CreateSound(160432334, HIT, 10, 1, false)
  1475. ApplyDamages(HIT.Parent:FindFirstChildOfClass("Humanoid"),35)
  1476. end
  1477. end
  1478. end
  1479. TIMER = 55
  1480. WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = 330704232, SoundPitch = 1, SoundVolume = 4})
  1481. WACKYEFFECT({Time = 6, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.1,0.1,DISTANCE), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS,POS)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1482. for i=0, 0.3, 0.1 / Animation_Speed do
  1483. Swait()
  1484. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1485. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
  1486. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1487. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1488. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1489. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
  1490. end
  1491. if AMMO <= 0 then
  1492. FIRING = false
  1493. end
  1494. SHOOTING = false
  1495. end
  1496. end)
  1497. repeat
  1498. Swait()
  1499. if SHOOTING == false then
  1500. TIMER = TIMER - 1
  1501. if TIMER <= 0 then
  1502. FIRING = false
  1503. end
  1504. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1505. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
  1506. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1507. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1508. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1509. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
  1510. end
  1511. until FIRING == false and SHOOTING == false
  1512. MOUSE:Disconnect()
  1513. for i=0, 0.3, 0.1 / Animation_Speed do
  1514. Swait()
  1515. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1516. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed)
  1517. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1518. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1519. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1520. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1521. end
  1522. GUNWELD.Part0 = Torso
  1523. GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90))
  1524. Speed = 20
  1525. ATTACK = false
  1526. Rooted = false
  1527. end
  1528.  
  1529. function ee()
  1530. ATTACK = true
  1531. Rooted = true
  1532. for i=0, 1, 0.1 / Animation_Speed do
  1533. Swait()
  1534. 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)
  1535. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed)
  1536. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(0), RAD(0), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1537. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(0), RAD(0), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1538. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1539. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1540. end
  1541. CameraEnshaking(1,45)
  1542. CreateSound(363808674, Torso, 6, 1, false)
  1543. for i=0, 0.5, 0.1 / Animation_Speed do
  1544. Swait()
  1545. 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)
  1546. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(25)), 1 / Animation_Speed)
  1547. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(-40), RAD(50), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1548. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(40), RAD(50), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1549. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1550. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1551. end
  1552. CameraEnshaking(1,45)
  1553. CreateSound(363808674, Torso, 6, 1, false)
  1554. for i=0, 0.5, 0.1 / Animation_Speed do
  1555. Swait()
  1556. 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)
  1557. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(-25)), 1 / Animation_Speed)
  1558. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(40), RAD(-50), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1559. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(-40), RAD(-50), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1560. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1561. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1562. end
  1563. ATTACK = false
  1564. Rooted = false
  1565. end
  1566.  
  1567. --//=================================\\
  1568. --|| ASSIGN THINGS TO KEYS
  1569. --\\=================================//
  1570.  
  1571. function MouseDown(Mouse)
  1572. HOLD = true
  1573. if ATTACK == false then
  1574. Attack()
  1575. end
  1576. end
  1577.  
  1578. function MouseUp(Mouse)
  1579. HOLD = false
  1580. end
  1581.  
  1582. function KeyDown(Key)
  1583. KEYHOLD = true
  1584. if Key == "z" and ATTACK == false then
  1585. if CLOAKED == false then
  1586. Cloaked()
  1587. else
  1588. CLOAKED = false
  1589. end
  1590. end
  1591.  
  1592. if Key == "t" and ATTACK == false then
  1593. Taunt()
  1594. end
  1595.  
  1596. if Key == "y" and ATTACK == false then
  1597. ee()
  1598. end
  1599.  
  1600. if Key == "q" and ATTACK == false then
  1601. Silence()
  1602. end
  1603.  
  1604. if string.byte(Key) == 50 and ATTACK == false and CLOAKED == false then
  1605. if Speed == 12 then
  1606. Speed = 30
  1607. elseif Speed == 30 then
  1608. Speed = 12
  1609. end
  1610. end
  1611. end
  1612.  
  1613. function KeyUp(Key)
  1614. KEYHOLD = false
  1615. end
  1616.  
  1617. Mouse.Button1Down:connect(function(NEWKEY)
  1618. MouseDown(NEWKEY)
  1619. end)
  1620. Mouse.Button1Up:connect(function(NEWKEY)
  1621. MouseUp(NEWKEY)
  1622. end)
  1623. Mouse.KeyDown:connect(function(NEWKEY)
  1624. KeyDown(NEWKEY)
  1625. end)
  1626. Mouse.KeyUp:connect(function(NEWKEY)
  1627. KeyUp(NEWKEY)
  1628. end)
  1629.  
  1630. --//=================================\\
  1631. --\\=================================//
  1632.  
  1633. function unanchor()
  1634. if UNANCHOR == true then
  1635. g = Character:GetChildren()
  1636. for i = 1, #g do
  1637. if g[i].ClassName == "Part" then
  1638. g[i].Anchored = false
  1639. end
  1640. end
  1641. end
  1642. end
  1643.  
  1644. --//=================================\\
  1645. --|| WRAP THE WHOLE SCRIPT UP
  1646. --\\=================================//
  1647.  
  1648. Humanoid.Changed:connect(function(Jump)
  1649. if Jump == "Jump" and (Disable_Jump == true) then
  1650. Humanoid.Jump = false
  1651. end
  1652. end)
  1653.  
  1654. while true do
  1655. Swait()
  1656. script.Parent = WEAPONGUI
  1657. ANIMATE.Parent = nil
  1658. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1659. v:Stop();
  1660. end
  1661. SINE = SINE + CHANGE
  1662. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1663. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1664. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1665. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1666. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1667. 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)
  1668. 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)
  1669. 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)
  1670. 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)
  1671. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1672. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1673. 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)
  1674. 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)
  1675. 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)
  1676. end
  1677. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1678. ANIM = "Jump"
  1679. if PLAYANIMS == true then
  1680. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1681. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1682. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1683. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1684. 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)
  1685. 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)
  1686. end
  1687. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1688. ANIM = "Fall"
  1689. if PLAYANIMS == true then
  1690. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1691. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1692. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1693. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1694. 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)
  1695. 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)
  1696. end
  1697. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1698. ANIM = "Idle"
  1699. if PLAYANIMS == true then
  1700. 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)
  1701. 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)
  1702. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(15), RAD(35), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1703. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1704. 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)
  1705. 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)
  1706. end
  1707. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1708. ANIM = "Walk"
  1709. if PLAYANIMS == true then
  1710. if Humanoid.WalkSpeed <= 17 then
  1711. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1712. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1713. 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)
  1714. 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)
  1715. 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)
  1716. 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)
  1717. else
  1718. 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)
  1719. 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)
  1720. 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)
  1721. 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)
  1722. 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)
  1723. 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)
  1724. end
  1725. end
  1726. end
  1727. BMUSIC.SoundId = "rbxassetid://"..SONGID
  1728. BMUSIC.Looped = true
  1729. BMUSIC.Pitch = PITCH
  1730. BMUSIC.Volume = VOLUME
  1731. BMUSIC.Playing = true
  1732. if BMUSIC.Parent ~= RootPart then
  1733. BMUSIC = IT("Sound",RootPart)
  1734. end
  1735. unanchor()
  1736. if Rooted == false then
  1737. Disable_Jump = false
  1738. Humanoid.WalkSpeed = Speed
  1739. elseif Rooted == true then
  1740. Disable_Jump = true
  1741. Humanoid.WalkSpeed = 0
  1742. end
  1743. if Head:FindFirstChild("face") then
  1744. Head.face:remove()
  1745. elseif Head:FindFirstChildOfClass("Sound") then
  1746. Head:FindFirstChildOfClass("Sound"):remove()
  1747. end
  1748. Humanoid.Health = Humanoid.Health + 1
  1749. end
  1750.  
  1751. --//=================================\\
  1752. --\\=================================//
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758. --//====================================================\\--
  1759. --|| END OF SCRIPT
  1760. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement