Advertisement
DarkScriptZEditors

Ghost Gun

Jan 3rd, 2019
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.52 KB | None | 0 0
  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")
  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. SIZE = 1
  163.  
  164. IT = Instance.new
  165. CF = CFrame.new
  166. VT = Vector3.new
  167. RAD = math.rad
  168. C3 = Color3.new
  169. UD2 = UDim2.new
  170. BRICKC = BrickColor.new
  171. ANGLES = CFrame.Angles
  172. EULER = CFrame.fromEulerAnglesXYZ
  173. COS = math.cos
  174. ACOS = math.acos
  175. SIN = math.sin
  176. ASIN = math.asin
  177. ABS = math.abs
  178. MRANDOM = math.random
  179. FLOOR = math.floor
  180.  
  181. --//=================================\\
  182. --|| USEFUL VALUES
  183. --\\=================================//
  184.  
  185. Animation_Speed = 3
  186. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  187. local Speed = 10
  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 ANIMATOR = Humanoid.Animator
  212. local ANIMATE = Character.Animate
  213. local UNANCHOR = true
  214. local GHOSTS = {}
  215. ANIMATE:remove()
  216. Character.Archivable = true
  217. script.Parent = WEAPONGUI
  218. local GHOSTBASE = Character:Clone()
  219. GHOSTBASE.Parent = nil
  220. GHOSTBASE.Name = "Ghost"
  221. for _, c in pairs(GHOSTBASE:GetChildren()) do
  222. if c.ClassName == "Part" and c.Transparency < 1 then
  223. c.Color = C3(0,0,0)
  224. if c.ClassName == "Accessory" or c.ClassName == "Hat" or c.ClassName == "CharacterMesh" or c.ClassName == "Shirt" or c.ClassName == "Pants" then
  225. c:remove()
  226. end
  227. end
  228. end
  229. local sick = Instance.new("Sound",Torso)
  230. sick.SoundId = "rbxassetid://1472374501"
  231. sick.Looped = true
  232. sick.Pitch = 0.7
  233. sick.Volume = 3
  234. sick:Play()
  235. local Effects = IT("Folder", Character)
  236. Effects.Name = "Effects"
  237. Character.Archivable = false
  238.  
  239. --//=================================\\
  240. --\\=================================//
  241.  
  242.  
  243. --//=================================\\
  244. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  245. --\\=================================//
  246.  
  247. ArtificialHB = Instance.new("BindableEvent", script)
  248. ArtificialHB.Name = "ArtificialHB"
  249.  
  250. script:WaitForChild("ArtificialHB")
  251.  
  252. frame = Frame_Speed
  253. tf = 0
  254. allowframeloss = false
  255. tossremainder = false
  256. lastframe = tick()
  257. script.ArtificialHB:Fire()
  258.  
  259. game:GetService("RunService").Heartbeat:connect(function(s, p)
  260. tf = tf + s
  261. if tf >= frame then
  262. if allowframeloss then
  263. script.ArtificialHB:Fire()
  264. lastframe = tick()
  265. else
  266. for i = 1, math.floor(tf / frame) do
  267. script.ArtificialHB:Fire()
  268. end
  269. lastframe = tick()
  270. end
  271. if tossremainder then
  272. tf = 0
  273. else
  274. tf = tf - frame * math.floor(tf / frame)
  275. end
  276. end
  277. end)
  278.  
  279. --//=================================\\
  280. --\\=================================//
  281.  
  282. --//=================================\\
  283. --|| SOME FUNCTIONS
  284. --\\=================================//
  285.  
  286. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  287. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  288. end
  289.  
  290. function PositiveAngle(NUMBER)
  291. if NUMBER >= 0 then
  292. NUMBER = 0
  293. end
  294. return NUMBER
  295. end
  296.  
  297. function NegativeAngle(NUMBER)
  298. if NUMBER <= 0 then
  299. NUMBER = 0
  300. end
  301. return NUMBER
  302. end
  303.  
  304. function Swait(NUMBER)
  305. if NUMBER == 0 or NUMBER == nil then
  306. ArtificialHB.Event:wait()
  307. else
  308. for i = 1, NUMBER do
  309. ArtificialHB.Event:wait()
  310. end
  311. end
  312. end
  313.  
  314. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  315. local NEWMESH = IT(MESH)
  316. if MESH == "SpecialMesh" then
  317. NEWMESH.MeshType = MESHTYPE
  318. if MESHID ~= "nil" and MESHID ~= "" then
  319. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  320. end
  321. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  322. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  323. end
  324. end
  325. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  326. NEWMESH.Scale = SCALE
  327. NEWMESH.Parent = PARENT
  328. return NEWMESH
  329. end
  330.  
  331. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  332. local NEWPART = IT("Part")
  333. NEWPART.formFactor = FORMFACTOR
  334. NEWPART.Reflectance = REFLECTANCE
  335. NEWPART.Transparency = TRANSPARENCY
  336. NEWPART.CanCollide = false
  337. NEWPART.Locked = true
  338. NEWPART.Anchored = true
  339. if ANCHOR == false then
  340. NEWPART.Anchored = false
  341. end
  342. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  343. NEWPART.Name = NAME
  344. NEWPART.Size = SIZE
  345. NEWPART.Position = Torso.Position
  346. NEWPART.Material = MATERIAL
  347. NEWPART:BreakJoints()
  348. NEWPART.Parent = PARENT
  349. return NEWPART
  350. end
  351.  
  352. local function weldBetween(a, b)
  353. local weldd = Instance.new("ManualWeld")
  354. weldd.Part0 = a
  355. weldd.Part1 = b
  356. weldd.C0 = CFrame.new()
  357. weldd.C1 = b.CFrame:inverse() * a.CFrame
  358. weldd.Parent = a
  359. return weldd
  360. end
  361.  
  362.  
  363. function QuaternionFromCFrame(cf)
  364. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  365. local trace = m00 + m11 + m22
  366. if trace > 0 then
  367. local s = math.sqrt(1 + trace)
  368. local recip = 0.5 / s
  369. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  370. else
  371. local i = 0
  372. if m11 > m00 then
  373. i = 1
  374. end
  375. if m22 > (i == 0 and m00 or m11) then
  376. i = 2
  377. end
  378. if i == 0 then
  379. local s = math.sqrt(m00 - m11 - m22 + 1)
  380. local recip = 0.5 / s
  381. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  382. elseif i == 1 then
  383. local s = math.sqrt(m11 - m22 - m00 + 1)
  384. local recip = 0.5 / s
  385. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  386. elseif i == 2 then
  387. local s = math.sqrt(m22 - m00 - m11 + 1)
  388. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  389. end
  390. end
  391. end
  392.  
  393. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  394. local xs, ys, zs = x + x, y + y, z + z
  395. local wx, wy, wz = w * xs, w * ys, w * zs
  396. local xx = x * xs
  397. local xy = x * ys
  398. local xz = x * zs
  399. local yy = y * ys
  400. local yz = y * zs
  401. local zz = z * zs
  402. 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))
  403. end
  404.  
  405. function QuaternionSlerp(a, b, t)
  406. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  407. local startInterp, finishInterp;
  408. if cosTheta >= 0.0001 then
  409. if (1 - cosTheta) > 0.0001 then
  410. local theta = ACOS(cosTheta)
  411. local invSinTheta = 1 / SIN(theta)
  412. startInterp = SIN((1 - t) * theta) * invSinTheta
  413. finishInterp = SIN(t * theta) * invSinTheta
  414. else
  415. startInterp = 1 - t
  416. finishInterp = t
  417. end
  418. else
  419. if (1 + cosTheta) > 0.0001 then
  420. local theta = ACOS(-cosTheta)
  421. local invSinTheta = 1 / SIN(theta)
  422. startInterp = SIN((t - 1) * theta) * invSinTheta
  423. finishInterp = SIN(t * theta) * invSinTheta
  424. else
  425. startInterp = t - 1
  426. finishInterp = t
  427. end
  428. end
  429. 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
  430. end
  431.  
  432. function Clerp(a, b, t)
  433. local qa = {QuaternionFromCFrame(a)}
  434. local qb = {QuaternionFromCFrame(b)}
  435. local ax, ay, az = a.x, a.y, a.z
  436. local bx, by, bz = b.x, b.y, b.z
  437. local _t = 1 - t
  438. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  439. end
  440.  
  441. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  442. local frame = IT("Frame")
  443. frame.BackgroundTransparency = TRANSPARENCY
  444. frame.BorderSizePixel = BORDERSIZEPIXEL
  445. frame.Position = POSITION
  446. frame.Size = SIZE
  447. frame.BackgroundColor3 = COLOR
  448. frame.BorderColor3 = BORDERCOLOR
  449. frame.Name = NAME
  450. frame.Parent = PARENT
  451. return frame
  452. end
  453.  
  454. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  455. local label = IT("TextLabel")
  456. label.BackgroundTransparency = 1
  457. label.Size = UD2(1, 0, 1, 0)
  458. label.Position = UD2(0, 0, 0, 0)
  459. label.TextColor3 = TEXTCOLOR
  460. label.TextStrokeTransparency = STROKETRANSPARENCY
  461. label.TextTransparency = TRANSPARENCY
  462. label.FontSize = TEXTFONTSIZE
  463. label.Font = TEXTFONT
  464. label.BorderSizePixel = BORDERSIZEPIXEL
  465. label.TextScaled = false
  466. label.Text = TEXT
  467. label.Name = NAME
  468. label.Parent = PARENT
  469. return label
  470. end
  471.  
  472. function NoOutlines(PART)
  473. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  474. end
  475.  
  476. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  477. local NEWWELD = IT(TYPE)
  478. NEWWELD.Part0 = PART0
  479. NEWWELD.Part1 = PART1
  480. NEWWELD.C0 = C0
  481. NEWWELD.C1 = C1
  482. NEWWELD.Parent = PARENT
  483. return NEWWELD
  484. end
  485.  
  486. local S = IT("Sound")
  487. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  488. local NEWSOUND = nil
  489. coroutine.resume(coroutine.create(function()
  490. NEWSOUND = S:Clone()
  491. NEWSOUND.Parent = PARENT
  492. NEWSOUND.Volume = VOLUME
  493. NEWSOUND.Pitch = PITCH
  494. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  495. NEWSOUND:play()
  496. if DOESLOOP == true then
  497. NEWSOUND.Looped = true
  498. else
  499. repeat wait(1) until NEWSOUND.Playing == false
  500. NEWSOUND:remove()
  501. end
  502. end))
  503. return NEWSOUND
  504. end
  505.  
  506. function CFrameFromTopBack(at, top, back)
  507. local right = top:Cross(back)
  508. 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)
  509. end
  510.  
  511. --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})
  512. function WACKYEFFECT(Table)
  513. local TYPE = (Table.EffectType or "Sphere")
  514. local SIZE = (Table.Size or VT(1,1,1))
  515. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  516. local TRANSPARENCY = (Table.Transparency or 0)
  517. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  518. local CFRAME = (Table.CFrame or Torso.CFrame)
  519. local MOVEDIRECTION = (Table.MoveToPos or nil)
  520. local ROTATION1 = (Table.RotationX or 0)
  521. local ROTATION2 = (Table.RotationY or 0)
  522. local ROTATION3 = (Table.RotationZ or 0)
  523. local MATERIAL = (Table.Material or "Neon")
  524. local COLOR = (Table.Color or C3(1,1,1))
  525. local TIME = (Table.Time or 45)
  526. local SOUNDID = (Table.SoundID or nil)
  527. local SOUNDPITCH = (Table.SoundPitch or nil)
  528. local SOUNDVOLUME = (Table.SoundVolume or nil)
  529. coroutine.resume(coroutine.create(function()
  530. local PLAYSSOUND = false
  531. local SOUND = nil
  532. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  533. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  534. PLAYSSOUND = true
  535. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  536. end
  537. EFFECT.Color = COLOR
  538. local MSH = nil
  539. if TYPE == "Sphere" then
  540. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  541. elseif TYPE == "Block" then
  542. MSH = IT("BlockMesh",EFFECT)
  543. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  544. elseif TYPE == "Wave" then
  545. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  546. elseif TYPE == "Ring" then
  547. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  548. elseif TYPE == "Slash" then
  549. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  550. elseif TYPE == "Round Slash" then
  551. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  552. elseif TYPE == "Swirl" then
  553. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  554. elseif TYPE == "Skull" then
  555. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  556. elseif TYPE == "Crystal" then
  557. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  558. end
  559. if MSH ~= nil then
  560. local MOVESPEED = nil
  561. if MOVEDIRECTION ~= nil then
  562. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  563. end
  564. local GROWTH = SIZE - ENDSIZE
  565. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  566. if TYPE == "Block" then
  567. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  568. else
  569. EFFECT.CFrame = CFRAME
  570. end
  571. for LOOP = 1, TIME+1 do
  572. Swait()
  573. MSH.Scale = MSH.Scale - GROWTH/TIME
  574. if TYPE == "Wave" then
  575. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  576. end
  577. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  578. if TYPE == "Block" then
  579. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  580. else
  581. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  582. end
  583. if MOVEDIRECTION ~= nil then
  584. local ORI = EFFECT.Orientation
  585. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  586. EFFECT.Orientation = ORI
  587. end
  588. end
  589. if PLAYSSOUND == false then
  590. EFFECT:remove()
  591. else
  592. SOUND.Stopped:Connect(function()
  593. EFFECT:remove()
  594. end)
  595. end
  596. else
  597. if PLAYSSOUND == false then
  598. EFFECT:remove()
  599. else
  600. repeat Swait() until SOUND.Playing == false
  601. EFFECT:remove()
  602. end
  603. end
  604. end))
  605. end
  606.  
  607. function MakeForm(PART,TYPE)
  608. if TYPE == "Cyl" then
  609. local MSH = IT("CylinderMesh",PART)
  610. elseif TYPE == "Ball" then
  611. local MSH = IT("SpecialMesh",PART)
  612. MSH.MeshType = "Sphere"
  613. elseif TYPE == "Wedge" then
  614. local MSH = IT("SpecialMesh",PART)
  615. MSH.MeshType = "Wedge"
  616. end
  617. end
  618.  
  619. Debris = game:GetService("Debris")
  620.  
  621. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  622. local DIRECTION = CF(StartPos,EndPos).lookVector
  623. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  624. end
  625.  
  626. function turnto(position)
  627. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  628. end
  629.  
  630. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  631. if FLOOR ~= nil then
  632. coroutine.resume(coroutine.create(function()
  633. local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  634. PART.CFrame = CF(POSITION)
  635. for i = 1, 45 do
  636. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  637. RingPiece.Material = FLOOR.Material
  638. RingPiece.Color = FLOOR.Color
  639. RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  640. Debris:AddItem(RingPiece,SWAIT)
  641. end
  642. PART:remove()
  643. end))
  644. end
  645. end
  646.  
  647. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH,DOES360)
  648. if FLOOR ~= nil then
  649. for i = 1, AMOUNT do
  650. local DEBREE = CreatePart(3, Effects, "Neon", 0, 0, "Peal", "Debree", BLOCKSIZE, false)
  651. DEBREE.Material = FLOOR.Material
  652. DEBREE.Color = FLOOR.Color
  653. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  654. if DOES360 == true then
  655. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  656. else
  657. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),STRENGTH,MRANDOM(-STRENGTH,STRENGTH))
  658. end
  659. coroutine.resume(coroutine.create(function()
  660. Swait(15)
  661. DEBREE.Parent = workspace
  662. DEBREE.CanCollide = true
  663. Debris:AddItem(DEBREE,SWAIT)
  664. end))
  665. end
  666. end
  667. end
  668.  
  669. function SpawnTrail(FROM,TO)
  670. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Pearl", "Arrow", VT(0,0,0))
  671. MakeForm(TRAIL,"Cyl")
  672. local DIST = (FROM - TO).Magnitude
  673. TRAIL.Size = VT(0.1,DIST,0.1)
  674. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  675. coroutine.resume(coroutine.create(function()
  676. for i = 1, 5 do
  677. Swait()
  678. TRAIL.Transparency = TRAIL.Transparency + 0.1
  679. end
  680. TRAIL:remove()
  681. end))
  682. end
  683.  
  684. local Decal = IT("Decal")
  685. function SpawnBulletHole(POSITION)
  686. local O1 = CreatePart(3, Effects, "Neon", 0, 1, "Really red", "Bullet hole", VT(0.2,0,0.2))
  687. local decal = Decal:Clone()
  688. decal.Parent = O1
  689. decal.Face = "Top"
  690. decal.Texture = "http://www.roblox.com/asset/?id=130624105"
  691. local decal2 = Decal:Clone()
  692. decal2.Parent = O1
  693. decal2.Face = "Bottom"
  694. decal2.Texture = "http://www.roblox.com/asset/?id=130624105"
  695. O1.CFrame = POSITION*ANGLES(RAD(0),RAD(MRANDOM(-180,180)),RAD(0))
  696. Debris:AddItem(O1,5)
  697. end
  698.  
  699. local asd = Instance.new("ParticleEmitter")
  700. asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
  701. asd.LightEmission = .1
  702. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  703. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 2)})
  704. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  705. asd.Transparency = bbb
  706. asd.Size = aaa
  707. asd.ZOffset = .9
  708. asd.Acceleration = Vector3.new(0, -15, 0)
  709. asd.LockedToPart = false
  710. asd.EmissionDirection = "Back"
  711. asd.Lifetime = NumberRange.new(1, 2)
  712. asd.Rotation = NumberRange.new(-100, 100)
  713. asd.RotSpeed = NumberRange.new(-100, 100)
  714. asd.Speed = NumberRange.new(10)
  715. asd.Enabled = false
  716. asd.VelocitySpread = 999
  717.  
  718. function getbloody(victim,amount)
  719. local PART = IT("Part",Effects)
  720. PART.Transparency = 1
  721. PART.Size = victim.Size
  722. PART.Anchored = true
  723. PART.CanCollide = false
  724. PART.CFrame = CF(victim.Position)
  725. local HITPLAYERSOUNDS = {"356551938","264486467"}
  726. Debris:AddItem(PART,5)
  727. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  728. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  729. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  730. local prtcl = asd:Clone()
  731. prtcl.Parent = PART
  732. prtcl:Emit(amount*10)
  733. end
  734.  
  735. function BulletDetection(FROM,TO)
  736. local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
  737. coroutine.resume(coroutine.create(function()
  738. if AIMHIT ~= nil then
  739. if AIMHIT.Parent ~= Character then
  740. if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  741. if AIMHIT.Name ~= "Head" and AIMHIT.Parent.ClassName ~= "Accessory" then
  742. ApplyDamage(AIMHIT.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(15,25),AIMHIT)
  743. elseif AIMHIT.Name == "Head" or AIMHIT.Parent.ClassName == "Accessory" then
  744. if AIMHIT.Parent.ClassName == "Accessory" then
  745. if AIMHIT:FindFirstChild("HatAttachment") or AIMHIT:FindFirstChild("FaceFrontAttachment") or AIMHIT:FindFirstChild("HairAttachment") then
  746. AIMHIT.Parent.Parent:BreakJoints()
  747. if AIMHIT.Parent.Parent:FindFirstChild("Head") then
  748. getbloody(AIMHIT.Parent.Parent.Head,15)
  749. AIMHIT.Parent.Parent.Head:remove()
  750. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  751. end
  752. else
  753. ApplyDamage(AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(25,65),AIMHIT)
  754. end
  755. elseif AIMHIT.Name == "Head" then
  756. getbloody(AIMHIT,15)
  757. AIMHIT.Parent:BreakJoints()
  758. AIMHIT:remove()
  759. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  760. end
  761. end
  762. else
  763. CreateFlyingDebree(AIMHIT,CF(AIMPOS),7,VT(0.1,0.1,0.1),5,35,true)
  764. SpawnBulletHole(CF(AIMPOS,AIMPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0)))
  765. end
  766. end
  767. end
  768. end))
  769. return AIMHIT,AIMPOS,NORMAL
  770. end
  771.  
  772. --//=================================\\
  773. --|| WEAPON CREATION
  774. --\\=================================//
  775.  
  776. for i = 1, 35 do
  777. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false)
  778. FACE.Color = C3(0,0,0)
  779. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  780. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  781. end
  782. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  783. MakeForm(EYE,"Ball")
  784. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
  785. local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  786. MakeForm(EYE2,"Ball")
  787. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
  788. local Gun = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun", VT(0, 0, 0),false)
  789. local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "468351345", "468351348", VT(0.06,0.06,0.06), VT(0,0, 0))
  790. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, RightArm, Gun, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
  791.  
  792. local BODY = {}
  793.  
  794. for _, c in pairs(Character:GetDescendants()) do
  795. if c:IsA("BasePart") and c.Name ~= "Handle" then
  796. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  797. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  798. end
  799. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  800. elseif c:IsA("JointInstance") then
  801. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  802. end
  803. end
  804.  
  805. for e = 1, #BODY do
  806. if BODY[e] ~= nil then
  807. local STUFF = BODY[e]
  808. local PART = STUFF[1]
  809. local PARENT = STUFF[2]
  810. local MATERIAL = STUFF[3]
  811. local COLOR = STUFF[4]
  812. local TRANSPARENCY = STUFF[5]
  813. if PART.ClassName == "Part" and PART ~= RootPart then
  814. PART.Material = MATERIAL
  815. PART.Color = COLOR
  816. PART.Transparency = TRANSPARENCY
  817. end
  818. PART.AncestryChanged:Connect(function()
  819. PART.Parent = PARENT
  820. end)
  821. end
  822. end
  823.  
  824. function refit()
  825. Character.Parent = workspace
  826. for e = 1, #BODY do
  827. if BODY[e] ~= nil then
  828. local STUFF = BODY[e]
  829. local PART = STUFF[1]
  830. local PARENT = STUFF[2]
  831. local MATERIAL = STUFF[3]
  832. local COLOR = STUFF[4]
  833. local TRANSPARENCY = STUFF[5]
  834. if PART.ClassName == "Part" and PART ~= RootPart then
  835. PART.Material = MATERIAL
  836. PART.Color = COLOR
  837. PART.Transparency = TRANSPARENCY
  838. end
  839. if PART.Parent ~= PARENT then
  840. Humanoid:remove()
  841. PART.Parent = PARENT
  842. Humanoid = IT("Humanoid",Character)
  843. end
  844. end
  845. end
  846. end
  847.  
  848. local SKILLTEXTCOLOR = C3(0,0,0)
  849. local SKILLFONT = "SciFi"
  850. local SKILLTEXTSIZE = 7
  851.  
  852. Humanoid.Died:connect(function()
  853. refit()
  854. end)
  855.  
  856. function Blink()
  857. coroutine.resume(coroutine.create(function()
  858. if EYE ~= nil then
  859. for i = 1, 5 do
  860. Swait()
  861. EYE.Mesh.Scale = EYE.Mesh.Scale - VT(0,0.2,0)
  862. EYE2.Mesh.Scale = EYE.Mesh.Scale
  863. end
  864. for i = 1, 7 do
  865. Swait()
  866. EYE.Mesh.Scale = EYE.Mesh.Scale + VT(0,0.2,0)
  867. EYE2.Mesh.Scale = EYE.Mesh.Scale
  868. end
  869. EYE.Mesh.Scale = VT(1,1,1)
  870. EYE2.Mesh.Scale = EYE.Mesh.Scale
  871. end
  872. end))
  873. end
  874.  
  875. local AMMO1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.80, 0), UD2(0.07, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Ammo 1 Frame")
  876. local AMMO2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.80, 0), UD2(0.07, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Ammo 2 Frame")
  877. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  878. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  879.  
  880. local SKILL3TEXT = CreateLabel(SKILL1FRAME, "[Z] Shell", C3(0,0,0), 7, SKILLFONT, 0, 2, 1, "Text 3")
  881. local SKILL4TEXT = CreateLabel(SKILL2FRAME, "[X] Sinful Shell", C3(1,0,0), 8, "Antique", 0, 2, 1, "Text 4")
  882.  
  883. local AMMOIMAGE1 = IT("ImageLabel",AMMO1FRAME)
  884. AMMOIMAGE1.Size = UD2(1,0,1,0)
  885. AMMOIMAGE1.BackgroundTransparency = 1
  886. AMMOIMAGE1.BorderSizePixel = 0
  887. AMMOIMAGE1.Image = "http://www.roblox.com/asset/?id=1493961907"
  888. local AMMOIMAGE2 = IT("ImageLabel",AMMO2FRAME)
  889. AMMOIMAGE2.Size = UD2(1,0,1,0)
  890. AMMOIMAGE2.BackgroundTransparency = 1
  891. AMMOIMAGE2.BorderSizePixel = 0
  892. AMMOIMAGE2.Image = "http://www.roblox.com/asset/?id=1493962162"
  893.  
  894. --//=================================\\
  895. --|| DAMAGE FUNCTIONS
  896. --\\=================================//
  897.  
  898. function StatLabel(CFRAME, TEXT, COLOR)
  899. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  900. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  901. local BODYGYRO = IT("BodyGyro", STATPART)
  902. game:GetService("Debris"):AddItem(STATPART ,5)
  903. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  904. BILLBOARDGUI.Adornee = STATPART
  905. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  906. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  907. BILLBOARDGUI.AlwaysOnTop = false
  908. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  909. TEXTLABEL.BackgroundTransparency = 1
  910. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  911. TEXTLABEL.Text = TEXT
  912. TEXTLABEL.Font = SKILLFONT
  913. TEXTLABEL.FontSize="Size42"
  914. TEXTLABEL.TextColor3 = COLOR
  915. TEXTLABEL.TextStrokeTransparency = 0
  916. TEXTLABEL.TextScaled = true
  917. TEXTLABEL.TextWrapped = true
  918. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  919. for i = 1, 10 do
  920. Swait()
  921. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  922. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/10)
  923. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  924. end
  925. THEPART.Parent = nil
  926. end),STATPART, TEXTLABEL)
  927. end
  928.  
  929. --//=================================\\
  930. --|| DAMAGING
  931. --\\=================================//
  932.  
  933. function ApplyDamage(Humanoid,Damage,TorsoPart)
  934. local defence = Instance.new("BoolValue",Humanoid.Parent)
  935. defence.Name = ("HitBy"..Player.Name)
  936. game:GetService("Debris"):AddItem(defence, 0.001)
  937. Damage = Damage * DAMAGEMULTIPLIER
  938. if Humanoid.Health ~= 0 then
  939. local CritChance = MRANDOM(1,100)
  940. if Damage > Humanoid.Health then
  941. Damage = math.ceil(Humanoid.Health)
  942. if Damage == 0 then
  943. Damage = 0.1
  944. end
  945. end
  946. Humanoid.Health = Humanoid.Health - Damage
  947. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  948. end
  949. end
  950.  
  951. function Ghostify(POSITION,RANGE)
  952. local CHILDREN = workspace:GetDescendants()
  953. for index, CHILD in pairs(CHILDREN) do
  954. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  955. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  956. if HUM then
  957. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  958. if TORSO then
  959. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  960. local GHOST = GHOSTBASE:Clone()
  961. GHOST.Parent = Effects
  962. GHOST.Torso.CFrame = TORSO.CFrame
  963. table.insert(GHOSTS,GHOST)
  964. CHILD:remove()
  965. end
  966. end
  967. end
  968. end
  969. end
  970. end
  971.  
  972. --//=================================\\
  973. --|| ATTACK FUNCTIONS AND STUFF
  974. --\\=================================//
  975.  
  976. function Shell()
  977. ATTACK = true
  978. Rooted = false
  979. local GYRO = IT("BodyGyro",RootPart)
  980. GYRO.D = 750
  981. GYRO.P = 20000
  982. GYRO.MaxTorque = VT(0,40000000,0)
  983. for i=0, 1, 0.1 / Animation_Speed do
  984. Swait()
  985. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  986. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  987. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  988. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(115), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  989. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  990. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  991. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  992. end
  993. GYRO:remove()
  994. CreateSound(696483710, Gun, 5, 1, false)
  995. local AIMHIT,AIMPOS,NORMAL = BulletDetection(Gun.Position,Mouse.Hit.p)
  996. SpawnTrail(Gun.CFrame*CF(1.5,0.5,0).p,AIMPOS)
  997. WACKYEFFECT({Time = 3, EffectType = "Sphere", Size = VT(1,0.3,0.3), Size2 = VT(1,0,0), Transparency = 0, Transparency2 = 1, CFrame = Gun.CFrame*CF(1.5,0.5,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  998. for i=0, 0.3, 0.1 / Animation_Speed do
  999. Swait()
  1000. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1001. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  1002. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0.3) * ANGLES(RAD(110), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  1003. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  1004. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1005. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1006. end
  1007. ATTACK = false
  1008. Rooted = false
  1009. end
  1010.  
  1011. function Taunt()
  1012. ATTACK = true
  1013. local LAUGH = nil
  1014. coroutine.resume(coroutine.create(function()
  1015. repeat
  1016. Swait()
  1017. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0 + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  1018. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1019. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE, -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1020. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1021. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE + 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-2 - 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1022. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-75), RAD(0)) * ANGLES(RAD(-2 + 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1023. until LAUGH ~= nil
  1024. repeat
  1025. Swait()
  1026. LAUGH.Parent = Head
  1027. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0+(0.1*LAUGH.PlaybackLoudness/75) + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  1028. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE+(0.1*LAUGH.PlaybackLoudness/75)) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1029. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE+(0.1*LAUGH.PlaybackLoudness/75), -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1030. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE+(0.1*LAUGH.PlaybackLoudness/75), 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1031. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE-(0.1*LAUGH.PlaybackLoudness/75) + 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-2 - 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1032. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE-(0.1*LAUGH.PlaybackLoudness/75) - 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-75), RAD(0)) * ANGLES(RAD(-2 + 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1033. until LAUGH.Playing == false
  1034. ATTACK = false
  1035. end))
  1036. wait(0.1)
  1037. sick:Stop()
  1038. LAUGH = CreateSound(525166232, Head, 10, 1, false)
  1039. sick:Resume()
  1040. end
  1041.  
  1042. function SinfulShell()
  1043. ATTACK = true
  1044. Rooted = false
  1045. local GYRO = IT("BodyGyro",RootPart)
  1046. GYRO.D = 750
  1047. GYRO.P = 20000
  1048. GYRO.MaxTorque = VT(0,40000000,0)
  1049. for i=0, 1, 0.1 / Animation_Speed do
  1050. Swait()
  1051. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  1052. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1053. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  1054. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(115), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  1055. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  1056. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1057. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1058. end
  1059. GYRO:remove()
  1060. CreateSound(696483710, Gun, 5, 1, false)
  1061. WACKYEFFECT({Time = 3, EffectType = "Sphere", Size = VT(1,0.3,0.3), Size2 = VT(1,0,0), Transparency = 0, Transparency2 = 1, CFrame = Gun.CFrame*CF(1.5,0.5,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1062. coroutine.resume(coroutine.create(function()
  1063. local Bullet = CreatePart(3, Effects, "SmoothPlastic", 0, 0, "Really red", "Sinful bullet", VT(0,0,0))
  1064. CreateMesh("SpecialMesh", Bullet, "FileMesh", "94295100", "", VT(6, 6, 7), VT(0,0, 0))
  1065. Bullet.CFrame = Gun.CFrame*CF(1.5,0.5,0)
  1066. local AIMPOINT = Mouse.Hit.p
  1067. local STARTPOS = Gun.CFrame*CF(1.5,0.5,0).p
  1068. local VECTOR = CF(STARTPOS,AIMPOINT)
  1069. local IMPACTED = false
  1070. CreateSound(1393698948, Bullet, 10, 1, true)
  1071. for E = 1, 50 do
  1072. if IMPACTED == true then
  1073. break
  1074. end
  1075. local TARGETPOINT = VECTOR*CF(0,0,-E*5)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,1,0).p
  1076. Bullet.CFrame = CF(Bullet.Position,TARGETPOINT)
  1077. for i = 1, 5 do
  1078. Swait()
  1079. WACKYEFFECT({Time = 15, EffectType = "Swirl", Size = VT(1,1,1), Size2 = VT(3,3,3), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i+E, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1080. Bullet.CFrame = Bullet.CFrame*CF(0,0,-1)
  1081. local AIMHIT,AIMPOS,NORMAL = Raycast(Bullet.Position,Bullet.CFrame.lookVector,1.3,Character)
  1082. if AIMHIT ~= nil then
  1083. IMPACTED = true
  1084. break
  1085. end
  1086. end
  1087. end
  1088. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(10,10,10), Size2 = VT(9,9,9), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 182765513, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 7})
  1089. for i = 1, 7 do
  1090. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,15,1), Size2 = VT(0,25,0), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1091. end
  1092. Ghostify(Bullet.Position,10)
  1093. Bullet:remove()
  1094. end))
  1095. for i=0, 0.3, 0.1 / Animation_Speed do
  1096. Swait()
  1097. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1098. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  1099. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0.3) * ANGLES(RAD(110), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  1100. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  1101. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1102. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1103. end
  1104. ATTACK = false
  1105. Rooted = false
  1106. end
  1107.  
  1108. --//=================================\\
  1109. --|| ASSIGN THINGS TO KEYS
  1110. --\\=================================//
  1111.  
  1112. function MouseDown(Mouse)
  1113. if ATTACK == false then
  1114. end
  1115. end
  1116.  
  1117. function MouseUp(Mouse)
  1118. HOLD = false
  1119. end
  1120.  
  1121. function KeyDown(Key)
  1122. KEYHOLD = true
  1123. if Key == "z" and ATTACK == false then
  1124. Shell()
  1125. end
  1126.  
  1127. if Key == "t" and ATTACK == false then
  1128. Taunt()
  1129. end
  1130.  
  1131. if Key == "x" and ATTACK == false then
  1132. SinfulShell()
  1133. end
  1134. end
  1135.  
  1136. function KeyUp(Key)
  1137. KEYHOLD = false
  1138. end
  1139.  
  1140. Mouse.Button1Down:connect(function(NEWKEY)
  1141. MouseDown(NEWKEY)
  1142. end)
  1143. Mouse.Button1Up:connect(function(NEWKEY)
  1144. MouseUp(NEWKEY)
  1145. end)
  1146. Mouse.KeyDown:connect(function(NEWKEY)
  1147. KeyDown(NEWKEY)
  1148. end)
  1149. Mouse.KeyUp:connect(function(NEWKEY)
  1150. KeyUp(NEWKEY)
  1151. end)
  1152.  
  1153. --//=================================\\
  1154. --\\=================================//
  1155.  
  1156.  
  1157. function unanchor()
  1158. if UNANCHOR == true then
  1159. g = Character:GetChildren()
  1160. for i = 1, #g do
  1161. if g[i].ClassName == "Part" then
  1162. g[i].Anchored = false
  1163. end
  1164. end
  1165. end
  1166. end
  1167.  
  1168.  
  1169. --//=================================\\
  1170. --|| WRAP THE WHOLE SCRIPT UP
  1171. --\\=================================//
  1172.  
  1173. Humanoid.Changed:connect(function(Jump)
  1174. if Jump == "Jump" and (Disable_Jump == true) then
  1175. Humanoid.Jump = false
  1176. end
  1177. end)
  1178.  
  1179. local BLINKLOOP = 0
  1180.  
  1181. while true do
  1182. Swait()
  1183. script.Parent = WEAPONGUI
  1184. ANIMATE.Parent = nil
  1185. Humanoid.Parent = Character
  1186. if Humanoid then
  1187. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1188. IDLEANIMATION:Play()
  1189. end
  1190. SINE = SINE + CHANGE
  1191. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1192. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1193. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1194. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1195. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1196. 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)
  1197. 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)
  1198. 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.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1199. 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.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1200. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1201. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1202. 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)
  1203. 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)
  1204. 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)
  1205. end
  1206. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1207. ANIM = "Jump"
  1208. if ATTACK == false then
  1209. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1210. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1211. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1212. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1213. 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)
  1214. 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)
  1215. end
  1216. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1217. ANIM = "Fall"
  1218. if ATTACK == false then
  1219. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1220. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1221. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1222. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1223. 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)
  1224. 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)
  1225. end
  1226. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1227. ANIM = "Idle"
  1228. if ATTACK == false then
  1229. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(15)), 0.15 / Animation_Speed)
  1230. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1231. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1232. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1233. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  1234. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1235. end
  1236. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1237. ANIM = "Walk"
  1238. if ATTACK == false then
  1239. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.2) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1240. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 3 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1241. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(30), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  1242. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(30-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1243. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(30), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1244. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(30), RAD(-75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1245. end
  1246. end
  1247. unanchor()
  1248. Humanoid.MaxHealth = "inf"
  1249. Humanoid.Health = "inf"
  1250. if Rooted == false then
  1251. Disable_Jump = false
  1252. Humanoid.WalkSpeed = Speed
  1253. elseif Rooted == true then
  1254. Disable_Jump = true
  1255. Humanoid.WalkSpeed = 0
  1256. end
  1257. sick.SoundId = "rbxassetid://1472374501"
  1258. sick.Looped = true
  1259. sick.Pitch = 0.7
  1260. sick.Volume = 3
  1261. sick.Playing = true
  1262. sick.Parent = Torso
  1263. if Head:FindFirstChild("face") then
  1264. Head.face.Texture = "rbxassetid://403870689"
  1265. end
  1266. BLINKLOOP = BLINKLOOP + 1
  1267. if BLINKLOOP >=650 then
  1268. BLINKLOOP = 0
  1269. Blink()
  1270. end
  1271. if #GHOSTS>0 then
  1272. for e=1,#GHOSTS do
  1273. if GHOSTS[e]~=nil then
  1274. local Thing=GHOSTS[e]
  1275. if Thing~=nil then
  1276. if Thing:FindFirstChild("Head") then
  1277. if Thing:FindFirstChild("Head"):FindFirstChild("face") then
  1278. Thing:FindFirstChild("Head").face.Texture = "rbxassetid://479674570"
  1279. end
  1280. if Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound") then
  1281. Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound"):remove()
  1282. end
  1283. end
  1284. local TORSO = Thing:FindFirstChild("Torso")
  1285. if TORSO then
  1286. TORSO.Anchored = false
  1287. local ROOT = Thing.HumanoidRootPart
  1288. local RootJoint1 = ROOT:FindFirstChild("RootJoint")
  1289. local Neck1 = TORSO:FindFirstChild("Neck")
  1290. local RightShoulder1 = TORSO:FindFirstChild("Right Shoulder")
  1291. local LeftShoulder1 = TORSO:FindFirstChild("Left Shoulder")
  1292. local RightHip1 = TORSO:FindFirstChild("Right Hip")
  1293. local LeftHip1 = TORSO:FindFirstChild("Left Hip")
  1294. if ROOT and RootJoint1 then
  1295. local VELOCITY = (ROOT.Velocity * VT(1, 0, 1)).magnitude
  1296. if VELOCITY < 1 then
  1297. RootJoint1.C0 = ROOTC0 * CF(0, 0, 0 + 0.15 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(2.5 * SIN(SINE / 12)))
  1298. Neck1.C0 = NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD( - 2.5 * SIN(SINE / 12)))
  1299. RightShoulder1.C0 = CF(1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 1.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0
  1300. LeftShoulder1.C0 = CF(-1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-5 - 1.5 * SIN(SINE / 12))) * LEFTSHOULDERC0
  1301. RightHip1.C0 = CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  1302. LeftHip1.C0 = CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  1303. elseif VELOCITY > 1 then
  1304. RootJoint1.C0 = ROOTC0 * CF(0, 0, 0 + 0.15 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(2.5 * SIN(SINE / 12)))
  1305. Neck1.C0 = NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD( - 2.5 * SIN(SINE / 12)))
  1306. RightShoulder1.C0 = CF(1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(15 + 1.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0
  1307. LeftShoulder1.C0 = CF(-1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-15 - 1.5 * SIN(SINE / 12))) * LEFTSHOULDERC0
  1308. RightHip1.C0 = CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  1309. LeftHip1.C0 = CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  1310. end
  1311. end
  1312. local Human = Thing.Humanoid
  1313. if Human then
  1314. Human.HipHeight = 0.3
  1315. for _, c in pairs(Thing:GetChildren()) do
  1316. if c.ClassName == "Part" and c.Transparency < 1 then
  1317. c.Color = C3(0,0,0)
  1318. c.Transparency = 0.65 + 0.15 * COS(SINE / 25)
  1319. elseif c.ClassName == "Accessory" or c.ClassName == "Hat" or c.ClassName == "CharacterMesh" or c.ClassName == "Shirt" or c.ClassName == "Pants" then
  1320. c:remove()
  1321. end
  1322. end
  1323. if Human then
  1324. local IDLEANIMATION = Human:LoadAnimation(ROBLOXIDLEANIMATION)
  1325. IDLEANIMATION:Play()
  1326. end
  1327. local list = game.Workspace:children()
  1328. local torso = nil
  1329. local dist = 50
  1330. local temp = nil
  1331. local human = nil
  1332. local temp2 = nil
  1333. local OwnerInDanger = false
  1334. for x = 1, #list do
  1335. temp2 = list[x]
  1336. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  1337. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1338. human = temp2:findFirstChildOfClass("Humanoid")
  1339. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1340. if (temp.Position - Torso.Position).magnitude < 15 then
  1341. OwnerInDanger = true
  1342. newdist = (temp.Position - TORSO.Position).magnitude
  1343. dist = (Torso.Position - temp.Position).magnitude
  1344. Human:MoveTo(temp.Position)
  1345. torso = temp
  1346. if newdist < 7 then
  1347. torso.CFrame = CF(torso.Position,TORSO.Position)*CF(0,0,5)
  1348. CreateSound(814168787, temp, 1, 2, false)
  1349. ApplyDamage(human,MRANDOM(15,35),temp)
  1350. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,torso.Position)*CF(0,0,-2) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1351. WACKYEFFECT({Time = 35, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = torso.CFrame*CF(0,-4*torso.Size.Y/2,0), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1352. end
  1353. end
  1354. end
  1355. end
  1356. end
  1357. if OwnerInDanger == false then
  1358. for x = 1, #list do
  1359. temp2 = list[x]
  1360. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  1361. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1362. human = temp2:findFirstChildOfClass("Humanoid")
  1363. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1364. if (temp.Position - Torso.Position).magnitude < dist then
  1365. newdist = (temp.Position - TORSO.Position).magnitude
  1366. Human:MoveTo(temp.Position)
  1367. torso = temp
  1368. if newdist < 15 then
  1369. if MRANDOM(1,35) == 1 then
  1370. CreateSound(438665935, temp, 1, 3, false)
  1371. ApplyDamage(human,MRANDOM(2,20),temp)
  1372. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,torso.Position)*CF(0,0,-2) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1373. end
  1374. end
  1375. end
  1376. end
  1377. end
  1378. end
  1379. end
  1380. if torso == nil then
  1381. Human.WalkSpeed = Speed -0.2
  1382. if (Torso.Position - TORSO.Position).magnitude < 12 and (Torso.Position - TORSO.Position).magnitude >= 11 then
  1383. Human:MoveTo(TORSO.Position)
  1384. elseif (Torso.Position - TORSO.Position).magnitude > 15 then
  1385. Human:MoveTo(Torso.Position)
  1386. elseif (Torso.Position - TORSO.Position).magnitude < 11 then
  1387. Human:MoveTo(CF(Torso.Position,TORSO.Position)*CF(0,0,-5).p)
  1388. end
  1389. else
  1390. if OwnerInDanger == false then
  1391. Human.WalkSpeed = Speed*1.2
  1392. else
  1393. Human.WalkSpeed = Speed*5
  1394. end
  1395. end
  1396. if Human.Health == 0 then
  1397. Thing:remove()
  1398. table.remove(GHOSTS,e)
  1399. else
  1400. Human.Health = Human.Health + 0.5
  1401. end
  1402. else
  1403. Thing:remove()
  1404. table.remove(GHOSTS,e)
  1405. end
  1406. else
  1407. Thing:remove()
  1408. table.remove(GHOSTS,e)
  1409. end
  1410. end
  1411. end
  1412. end
  1413. end
  1414. refit()
  1415. end
  1416.  
  1417. --//=================================\\
  1418. --\\=================================//
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424. --//====================================================\\--
  1425. --|| END OF SCRIPT
  1426. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement