Advertisement
Guest User

Untitled

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