Advertisement
PierceTheCakeKeeper

Bomb shell FE test

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