Advertisement
ItzInfern

vaccum script

Jan 5th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.58 KB | None | 0 0
  1.  
  2.  
  3. --https://github.com/Mokiros/roblox-FE-compatibility
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. local RealPlayer = Player
  7. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  8.  
  9. --//====================================================\\--
  10. --|| CREATED BY SHACKLUSTER
  11. --\\====================================================//--
  12.  
  13.  
  14.  
  15. wait(0.2)
  16.  
  17.  
  18.  
  19. Player = game:GetService("Players").LocalPlayer
  20. PlayerGui = Player.PlayerGui
  21. Cam = workspace.CurrentCamera
  22. Backpack = Player.Backpack
  23. Character = Player.Character
  24. Humanoid = Character.Humanoid
  25. Mouse = Player:GetMouse()
  26. RootPart = Character["HumanoidRootPart"]
  27. Torso = Character["Torso"]
  28. Head = Character["Head"]
  29. RightArm = Character["Right Arm"]
  30. LeftArm = Character["Left Arm"]
  31. RightLeg = Character["Right Leg"]
  32. LeftLeg = Character["Left Leg"]
  33. RootJoint = RootPart["RootJoint"]
  34. Neck = Torso["Neck"]
  35. RightShoulder = Torso["Right Shoulder"]
  36. LeftShoulder = Torso["Left Shoulder"]
  37. RightHip = Torso["Right Hip"]
  38. LeftHip = Torso["Left Hip"]
  39. local sick = Instance.new("Sound",Torso)
  40. sick.SoundId = "rbxassetid://319444224"
  41. sick.Looped = true
  42. sick.Pitch = 1
  43. sick.Volume = 1
  44. local succing = {}
  45.  
  46. IT = Instance.new
  47. CF = CFrame.new
  48. VT = Vector3.new
  49. RAD = math.rad
  50. C3 = Color3.new
  51. UD2 = UDim2.new
  52. BRICKC = BrickColor.new
  53. ANGLES = CFrame.Angles
  54. EULER = CFrame.fromEulerAnglesXYZ
  55. COS = math.cos
  56. ACOS = math.acos
  57. SIN = math.sin
  58. ASIN = math.asin
  59. ABS = math.abs
  60. MRANDOM = math.random
  61. FLOOR = math.floor
  62.  
  63. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  64. local NEWMESH = IT(MESH)
  65. if MESH == "SpecialMesh" then
  66. NEWMESH.MeshType = MESHTYPE
  67. if MESHID ~= "nil" and MESHID ~= "" then
  68. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  69. end
  70. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  71. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  72. end
  73. end
  74. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  75. NEWMESH.Scale = SCALE
  76. NEWMESH.Parent = PARENT
  77. return NEWMESH
  78. end
  79.  
  80. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  81. local NEWPART = IT("Part")
  82. NEWPART.formFactor = FORMFACTOR
  83. NEWPART.Reflectance = REFLECTANCE
  84. NEWPART.Transparency = TRANSPARENCY
  85. NEWPART.CanCollide = false
  86. NEWPART.Locked = true
  87. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  88. NEWPART.Name = NAME
  89. NEWPART.Size = SIZE
  90. NEWPART.Position = Torso.Position
  91. NEWPART.Material = MATERIAL
  92. NEWPART:BreakJoints()
  93. NEWPART.Parent = PARENT
  94. return NEWPART
  95. end
  96.  
  97.  
  98. --//=================================\\
  99. --|| CUSTOMIZATION
  100. --\\=================================//
  101.  
  102. Class_Name = "Template"
  103. Weapon_Name = "Add-ons"
  104.  
  105. Custom_Colors = {
  106. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  107. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  108.  
  109. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  110. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  111. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  112. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  113. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  114.  
  115. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  116. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  117. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  118. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  119. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  120. }
  121.  
  122.  
  123. Player_Size = 1 --Size of the player.
  124. Animation_Speed = 3
  125. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  126.  
  127. local Speed = 16
  128. local Effects2 = {}
  129.  
  130. --//=================================\\
  131. --|| END OF CUSTOMIZATION
  132. --\\=================================//
  133.  
  134. local function weldBetween(a, b)
  135. local weldd = Instance.new("ManualWeld")
  136. weldd.Part0 = a
  137. weldd.Part1 = b
  138. weldd.C0 = CFrame.new()
  139. weldd.C1 = b.CFrame:inverse() * a.CFrame
  140. weldd.Parent = a
  141. return weldd
  142. end
  143.  
  144. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  145. local acs = Instance.new("Part")
  146. acs.CanCollide = false
  147. acs.Anchored = false
  148. acs.Size = Vector3.new(0,0,0)
  149. acs.CFrame = attachmentpart.CFrame
  150. acs.Parent = Character
  151. acs.BrickColor = color
  152. local meshs = Instance.new("SpecialMesh")
  153. meshs.MeshId = mesh
  154. meshs.TextureId = texture
  155. meshs.Parent = acs
  156. meshs.Scale = scale
  157. meshs.Offset = offset
  158. weldBetween(attachmentpart,acs)
  159. end
  160.  
  161. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  162. if TYPE == "Gem" then
  163. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  164. acs.Anchored = false
  165. acs.CanCollide = false
  166. acs.CFrame = PART.CFrame
  167. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  168. weldBetween(PART,acs)
  169. elseif TYPE == "Skull" then
  170. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  171. acs.Anchored = false
  172. acs.CanCollide = false
  173. acs.CFrame = PART.CFrame
  174. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  175. weldBetween(PART,acs)
  176. elseif TYPE == "Eye" then
  177. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  178. acs.Anchored = false
  179. acs.CanCollide = false
  180. acs.CFrame = PART.CFrame
  181. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  182. weldBetween(PART,acs)
  183. end
  184. end
  185.  
  186. --//=================================\\
  187. --|| USEFUL VALUES
  188. --\\=================================//
  189.  
  190. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  191. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  192. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  193. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  194. local CO1 = 0
  195. local CO2 = 0
  196. local CO3 = 0
  197. local CO4 = 0
  198. local CHANGEDEFENSE = 0
  199. local CHANGEDAMAGE = 0
  200. local CHANGEMOVEMENT = 0
  201. local ANIM = "Idle"
  202. local ATTACK = false
  203. local EQUIPPED = false
  204. local HOLD = false
  205. local COMBO = 1
  206. local LASTPOINT = nil
  207. local BLCF = nil
  208. local SCFR = nil
  209. local STAGGERHITANIM = false
  210. local STAGGERANIM = false
  211. local STUNANIM = false
  212. local CRITCHANCENUMBER = 0
  213. local IDLENUMBER = 0
  214. local DONUMBER = 0
  215. local HANDIDLE = false
  216. local SINE = 0
  217. local CHANGE = 2 / Animation_Speed
  218. local WALKINGANIM = false
  219. local WALK = 0
  220. local DISABLEJUMPING = false
  221. local HASBEENBLOCKED = false
  222. local STUNDELAYNUMBER = 0
  223. local MANADELAYNUMBER = 0
  224. local SECONDARYMANADELAYNUMBER = 0
  225. local ROBLOXIDLEANIMATION = IT("Animation")
  226. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  227. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  228. --ROBLOXIDLEANIMATION.Parent = Humanoid
  229. local WEAPONGUI = IT("ScreenGui", nil)
  230. WEAPONGUI.Name = "Weapon GUI"
  231. local WEAPONTOOL = IT("HopperBin", nil)
  232. WEAPONTOOL.Name = Weapon_Name
  233. local Weapon = IT("Model")
  234. Weapon.Name = Weapon_Name
  235. local Effects = IT("Folder", Weapon)
  236. Effects.Name = "Effects"
  237. local ANIMATOR = Humanoid.Animator
  238. local ANIMATE = Character.Animate
  239. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  240. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  241. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  242. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  243. local UNANCHOR = true
  244. local MAGICPARTICLE = "655109389"
  245.  
  246. --//=================================\\
  247. --\\=================================//
  248.  
  249.  
  250. --//=================================\\
  251. --|| DEBUFFS / BUFFS
  252. --\\=================================//
  253.  
  254. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  255. DEFENSECHANGE1.Name = "ChangeDefense"
  256. DEFENSECHANGE1.Value = 0
  257.  
  258. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  259. MOVEMENTCHANGE1.Name = "ChangeMovement"
  260. MOVEMENTCHANGE1.Value = 0
  261.  
  262. --//=================================\\
  263. --\\=================================//
  264.  
  265.  
  266.  
  267.  
  268.  
  269. --//=================================\\
  270. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  271. --\\=================================//
  272.  
  273. ArtificialHB = Instance.new("BindableEvent", script)
  274. ArtificialHB.Name = "ArtificialHB"
  275.  
  276. script:WaitForChild("ArtificialHB")
  277.  
  278. frame = Frame_Speed
  279. tf = 0
  280. allowframeloss = false
  281. tossremainder = false
  282. lastframe = tick()
  283. script.ArtificialHB:Fire()
  284.  
  285. game:GetService("RunService").Heartbeat:connect(function(s, p)
  286. tf = tf + s
  287. if tf >= frame then
  288. if allowframeloss then
  289. script.ArtificialHB:Fire()
  290. lastframe = tick()
  291. else
  292. for i = 1, math.floor(tf / frame) do
  293. script.ArtificialHB:Fire()
  294. end
  295. lastframe = tick()
  296. end
  297. if tossremainder then
  298. tf = 0
  299. else
  300. tf = tf - frame * math.floor(tf / frame)
  301. end
  302. end
  303. end)
  304.  
  305. --//=================================\\
  306. --\\=================================//
  307.  
  308.  
  309.  
  310.  
  311.  
  312. --//=================================\\
  313. --|| SOME FUNCTIONS
  314. --\\=================================//
  315.  
  316. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  317. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  318. end
  319.  
  320. function PositiveAngle(NUMBER)
  321. if NUMBER >= 0 then
  322. NUMBER = 0
  323. end
  324. return NUMBER
  325. end
  326.  
  327. function NegativeAngle(NUMBER)
  328. if NUMBER <= 0 then
  329. NUMBER = 0
  330. end
  331. return NUMBER
  332. end
  333.  
  334. function Swait(NUMBER)
  335. if NUMBER == 0 or NUMBER == nil then
  336. ArtificialHB.Event:wait()
  337. else
  338. for i = 1, NUMBER do
  339. ArtificialHB.Event:wait()
  340. end
  341. end
  342. end
  343.  
  344. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  345. local label = IT("TextLabel")
  346. label.BackgroundTransparency = 1
  347. label.Size = UD2(1, 0, 1, 0)
  348. label.Position = UD2(0, 0, 0, 0)
  349. label.TextColor3 = C3(255, 255, 255)
  350. label.TextStrokeTransparency = STROKETRANSPARENCY
  351. label.TextTransparency = TRANSPARENCY
  352. label.FontSize = TEXTFONTSIZE
  353. label.Font = TEXTFONT
  354. label.BorderSizePixel = BORDERSIZEPIXEL
  355. label.TextScaled = true
  356. label.Text = TEXT
  357. label.Name = NAME
  358. label.Parent = PARENT
  359. return label
  360. end
  361.  
  362. function NoOutlines(PART)
  363. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  364. end
  365.  
  366.  
  367. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  368. local NEWWELD = IT(TYPE)
  369. NEWWELD.Part0 = PART0
  370. NEWWELD.Part1 = PART1
  371. NEWWELD.C0 = C0
  372. NEWWELD.C1 = C1
  373. NEWWELD.Parent = PARENT
  374. return NEWWELD
  375. end
  376.  
  377. function CreateSound(ID, PARENT, VOLUME, PITCH)
  378. local NEWSOUND = nil
  379. coroutine.resume(coroutine.create(function()
  380. NEWSOUND = IT("Sound", PARENT)
  381. NEWSOUND.Volume = VOLUME
  382. NEWSOUND.Pitch = PITCH
  383. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  384. Swait()
  385. NEWSOUND:play()
  386. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  387. end))
  388. return NEWSOUND
  389. end
  390.  
  391. --//=================================\\
  392. --\\=================================//
  393.  
  394.  
  395. --//=================================\\
  396. --|| WEAPON CREATION
  397. --\\=================================//
  398.  
  399. if Player_Size ~= 1 then
  400. for _, v in pairs (Weapon:GetChildren()) do
  401. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  402. local p1 = v.Part1
  403. v.Part1 = nil
  404. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  405. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  406. v.Part1 = p1
  407. elseif v.ClassName == "Part" then
  408. for _, b in pairs (v:GetChildren()) do
  409. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  410. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  411. end
  412. end
  413. end
  414. end
  415. end
  416.  
  417. for _, c in pairs(Weapon:GetChildren()) do
  418. if c.ClassName == "Part" then
  419. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  420. end
  421. end
  422.  
  423. Weapon.Parent = Character
  424.  
  425. Humanoid.Died:connect(function()
  426. ATTACK = true
  427. end)
  428.  
  429. print(Class_Name.." loaded.")
  430.  
  431. --//=================================\\
  432. --\\=================================//
  433.  
  434.  
  435. local backpack = IT("Part",Weapon)
  436. backpack.Size = VT(0.15,0.15,0.15)
  437. local mesh = IT("SpecialMesh",backpack)
  438. mesh.MeshId = "rbxassetid://84313478"
  439. mesh.TextureId = "http://www.roblox.com/asset/?id=84313638"
  440. backpack.CFrame = Torso.CFrame * CF(0,0.2,1)
  441. backpack.BrickColor = BRICKC("Black")
  442. weldBetween(Torso,backpack)
  443.  
  444. local hose = IT("Part",Weapon)
  445. hose.Size = VT(0.15,0.15,0.15)
  446. local mesh = IT("SpecialMesh",hose)
  447. mesh.MeshId = "http://www.roblox.com/asset/?id=84313555"
  448. mesh.TextureId = "http://www.roblox.com/asset/?id=84313638"
  449. mesh.Scale = VT(2,2,2)
  450. mesh.Offset = VT(0, -0.4, -0.7)
  451. hose.CFrame = Torso.CFrame * CF(1.5,0.5,0.2) * ANGLES(RAD(90),RAD(35),RAD(180))
  452. hose.BrickColor = BRICKC("Black")
  453. weldBetween(Torso,hose)
  454.  
  455. local succ = IT("Part",Weapon)
  456. succ.Size = VT(2,2,2)
  457. succ.CanCollide = false
  458. succ.CFrame = Torso.CFrame * CF(1.5,1.3,-4) * ANGLES(RAD(90),RAD(0),RAD(180))
  459. succ.Transparency = 1
  460. succ.BrickColor = BRICKC("Black")
  461. weldBetween(Torso,succ)
  462.  
  463. for _, c in pairs(Weapon:GetChildren()) do
  464. if c.ClassName == "Part" then
  465. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  466. end
  467. end
  468.  
  469. local EyeSizes={
  470. NumberSequenceKeypoint.new(0,0.5,0),
  471. NumberSequenceKeypoint.new(1,0.2,0)
  472. }
  473. local EyeTrans={
  474. NumberSequenceKeypoint.new(0,0,0),
  475. NumberSequenceKeypoint.new(1,1,0)
  476. }
  477. local PE=Instance.new("ParticleEmitter")
  478. PE.LightEmission=0.3
  479. PE.Size=NumberSequence.new(EyeSizes)
  480. PE.Transparency=NumberSequence.new(EyeTrans)
  481. PE.Rotation=NumberRange.new(0,360)
  482. PE.LockedToPart = false
  483. PE.Speed = NumberRange.new(0,0,0)
  484. PE.ZOffset = 0.3
  485. PE.Rate = 999
  486. PE.VelocitySpread = 25
  487. PE.Name = "Particles"
  488.  
  489. function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
  490. local particle = nil
  491. coroutine.resume(coroutine.create(function(PART)
  492. particle = PE:Clone()
  493. Swait()
  494. particle.Rate = 999
  495. particle.Parent = art
  496. particle.Acceleration = accel
  497. if type == "Fire" then
  498. local EyeSizes={
  499. NumberSequenceKeypoint.new(0,size,size/2),
  500. NumberSequenceKeypoint.new(1,size/4,size/8)
  501. }
  502. particle.Size = NumberSequence.new(EyeSizes)
  503. elseif type == "Smoke" then
  504. local EyeSizes={
  505. NumberSequenceKeypoint.new(0,size/5,0),
  506. NumberSequenceKeypoint.new(1,size*2,0.5)
  507. }
  508. particle.Size = NumberSequence.new(EyeSizes)
  509. elseif type == "Solid" then
  510. local EyeSizes={
  511. NumberSequenceKeypoint.new(0,size,0),
  512. NumberSequenceKeypoint.new(1,size,0)
  513. }
  514. particle.Size = NumberSequence.new(EyeSizes)
  515. end
  516. particle.Lifetime=NumberRange.new(lifetime)
  517. particle.Drag = drag
  518. if locked == true then
  519. particle.LockedToPart = true
  520. end
  521. particle.Speed = NumberRange.new(speed*0.8,speed)
  522. particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
  523. particle.Enabled = isenabledbydefault
  524. particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
  525. end))
  526. return particle
  527. end
  528.  
  529. local poop = CreateParticles(succ,VT(0,0,0),5,2,"Smoke",false,false,5,35)
  530. local poop2 = CreateParticles(succ,VT(0,0,0),5,1,"Smoke",false,false,2,15)
  531.  
  532. --//=================================\\
  533. --|| DAMAGING
  534. --\\=================================//
  535.  
  536. function succnearest(position,range)
  537. for i,v in ipairs(workspace:GetChildren()) do
  538. local body = v:GetChildren()
  539. for part = 1, #body do
  540. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  541. if(body[part].Position - position).Magnitude < range then
  542. local bv = Instance.new("BodyVelocity")
  543. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  544. bv.velocity = CF(body[part].Position,succ.Position).lookVector*80
  545. bv.Parent = body[part]
  546. bv.Name = "SUCC"
  547. game:GetService("Debris"):AddItem(bv, 0.1)
  548. end
  549. end
  550. end
  551. if v.ClassName == "Part" then
  552. if v.Anchored == false and (v.Position - position).Magnitude < range then
  553. local bv = Instance.new("BodyVelocity")
  554. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  555. bv.velocity = CF(v.Position,succ.Position).lookVector*80
  556. bv.Parent = v
  557. bv.Name = "SUCC"
  558. game:GetService("Debris"):AddItem(bv, 0.1)
  559. end
  560. end
  561. end
  562. end
  563.  
  564. function cover(position,range)
  565. for i,v in ipairs(workspace:GetChildren()) do
  566. local body = v:GetChildren()
  567. for part = 1, #body do
  568. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  569. if(body[part].Position - position).Magnitude < range then
  570. CreateParticles(body[part],VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
  571. if v:FindFirstChild("Humanoid") then
  572. v.Humanoid.PlatformStand = true
  573. end
  574. end
  575. end
  576. end
  577. if v.ClassName == "Part" then
  578. if v.Anchored == false and (v.Position - position).Magnitude < range then
  579. CreateParticles(v,VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
  580. end
  581. end
  582. end
  583. end
  584.  
  585. function cough()
  586. CreateSound("328460122", succ, 3, 1)
  587. poop.VelocitySpread = 25
  588. poop:Emit(150)
  589. cover(CF(succ.Position)*CF(0,0,-1).p,15)
  590. end
  591.  
  592. --//=================================\\
  593. --|| ATTACK FUNCTIONS AND STUFF
  594. --\\=================================//
  595.  
  596. function CheckTableForString(Table, String)
  597. for i, v in pairs(Table) do
  598. if string.find(string.lower(String), string.lower(v)) then
  599. return true
  600. end
  601. end
  602. return false
  603. end
  604.  
  605. function CheckIntangible(Hit)
  606. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  607. if Hit and Hit.Parent then
  608. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  609. return true
  610. end
  611. end
  612. return false
  613. end
  614.  
  615. Debris = game:GetService("Debris")
  616.  
  617. function CastRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  618. local Direction = CFrame.new(StartPos, Vec).lookVector
  619. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  620. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  621. if RayHit and CheckIntangible(RayHit) then
  622. if DelayIfHit then
  623. wait()
  624. end
  625. RayHit, RayPos, RayNormal = CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  626. end
  627. return RayHit, RayPos, RayNormal
  628. end
  629.  
  630. function turnto(pos,part)
  631. part.CFrame = CF(part.Position,VT(pos.X,RootPart.Position.Y,pos.Z))
  632. end
  633.  
  634. function vacuum()
  635. sick:Play()
  636. local nado = IT("Part")
  637. local mesh = IT("SpecialMesh",nado)
  638. mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
  639. nado.Transparency = 0.5
  640. nado.CanCollide = false
  641. nado.Anchored = true
  642. local loop = 0
  643. succing = {}
  644. local harm = succ.Touched:Connect(function(hit)
  645. if hit.Anchored == false then
  646. hit:remove()
  647. CreateSound("261732529", succ, 3, 1)
  648. poop2:Emit(1)
  649. end
  650. end)
  651. repeat
  652. Swait()
  653. loop = loop + 75
  654. nado.Parent = Effects
  655. local RayHit,RayPos = CastRay(succ.Position, Mouse.Hit.p, 1000, Character, false)
  656. local distance = (succ.Position - RayPos).magnitude
  657. mesh.Scale = VT(distance/12,distance/3.2,distance/12)
  658. nado.CFrame = CFrame.new(succ.Position, RayPos) * CFrame.new(0, 0, -distance/2) * ANGLES(RAD(-90),RAD(loop),RAD(0))
  659. turnto(Mouse.Hit.p,RootPart)
  660. succnearest(RayPos,distance/2.5)
  661. if RayHit ~= nil then
  662. if RayHit.Anchored == false then
  663. local bv = Instance.new("BodyVelocity")
  664. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  665. bv.velocity = CF(RayHit.Position,succ.Position).lookVector*80
  666. bv.Parent = RayHit
  667. bv.Name = "SUCC"
  668. game:GetService("Debris"):AddItem(bv, 0.1)
  669. end
  670. end
  671. local TotalSuccs = math.ceil(distance / 65)
  672. local Direction = CFrame.new(RayPos, succ.Position).lookVector
  673. for i = 1, TotalSuccs do
  674. local NewPos = (RayPos + (Direction * (distance * (i / TotalSuccs))))
  675. succnearest(NewPos,distance/(i*2.5))
  676. end
  677. until HOLD == false
  678. if #succing>0 then
  679. for e=1,#succing do
  680. if succing[e]~=nil then
  681. local Thing=succing[e]
  682. Thing:remove()
  683. table.remove(succing,e)
  684. end
  685. end
  686. end
  687. succing = {}
  688. harm:disconnect()
  689. nado:remove()
  690. sick:Stop()
  691. end
  692.  
  693. --//=================================\\
  694. --|| ASSIGN THINGS TO KEYS
  695. --\\=================================//
  696.  
  697. Humanoid.Changed:connect(function(Jump)
  698. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  699. Humanoid.Jump = false
  700. end
  701. end)
  702.  
  703. function MouseDown(Mouse)
  704. HOLD = true
  705. vacuum()
  706. end
  707.  
  708. function MouseUp(Mouse)
  709. HOLD = false
  710. end
  711.  
  712. function KeyDown(Key)
  713. if Key == "t" and ATTACK == false then
  714. CreateSound("743953262", Head, 3, 1)
  715. end
  716. if Key == "e" and ATTACK == false then
  717. cough()
  718. end
  719. end
  720.  
  721. function KeyUp(Key)
  722. end
  723.  
  724. Mouse.Button1Down:connect(function(NEWKEY)
  725. MouseDown(NEWKEY)
  726. end)
  727. Mouse.Button1Up:connect(function(NEWKEY)
  728. MouseUp(NEWKEY)
  729. end)
  730. Mouse.KeyDown:connect(function(NEWKEY)
  731. KeyDown(NEWKEY)
  732. end)
  733. Mouse.KeyUp:connect(function(NEWKEY)
  734. KeyUp(NEWKEY)
  735. end)
  736.  
  737. --//=================================\\
  738. --\\=================================//
  739.  
  740.  
  741. function unanchor()
  742. if UNANCHOR == true then
  743. g = Character:GetChildren()
  744. for i = 1, #g do
  745. if g[i].ClassName == "Part" then
  746. g[i].Anchored = false
  747. end
  748. end
  749. end
  750. end
  751.  
  752.  
  753. --//=================================\\
  754. --|| WRAP THE WHOLE SCRIPT UP
  755. --\\=================================//
  756.  
  757. Humanoid.Changed:connect(function(Jump)
  758. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  759. Humanoid.Jump = false
  760. end
  761. end)
  762.  
  763. while true do
  764. Swait()
  765. if #Effects2>0 then
  766. for e=1,#Effects2 do
  767. if Effects2[e]~=nil then
  768. local Thing=Effects2[e]
  769. if Thing~=nil then
  770. local Part=Thing[1]
  771. local Mode=Thing[2]
  772. local Delay=Thing[3]
  773. local IncX=Thing[4]
  774. local IncY=Thing[5]
  775. local IncZ=Thing[6]
  776. local Part2=Thing[8]
  777. if Thing[1].Transparency<=1 then
  778. if Thing[2]=="Block1" then
  779. Thing[1].CFrame=Thing[1].CFrame
  780. Mesh=Thing[1].Mesh
  781. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  782. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  783. elseif Thing[2]=="Cylinder" then
  784. Mesh=Thing[1].Mesh
  785. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  786. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  787. elseif Thing[2]=="Blood" then
  788. Mesh=Thing[7]
  789. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  790. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  791. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  792. elseif Thing[2]=="Elec" then
  793. Mesh=Thing[1].Mesh
  794. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  795. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  796. elseif Thing[2]=="Disappear" then
  797. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  798. end
  799. else
  800. Part.Parent=nil
  801. table.remove(Effects2,e)
  802. end
  803. end
  804. end
  805. end
  806. end
  807. unanchor()
  808. Humanoid.MaxHealth = "inf"
  809. Humanoid.Health = "inf"
  810. if Rooted == false then
  811. Disable_Jump = false
  812. Humanoid.WalkSpeed = Speed
  813. elseif Rooted == true then
  814. Disable_Jump = true
  815. Humanoid.WalkSpeed = 0
  816. end
  817. if sick == nil then
  818. sick = Instance.new("Sound",Torso)
  819. sick.SoundId = "rbxassetid://319444224"
  820. sick.Looped = true
  821. sick.Pitch = 1
  822. sick.Volume = 1
  823. end
  824. if #succing>0 then
  825. for e=1,#succing do
  826. if succing[e]~=nil then
  827. local Thing=succing[e]
  828. Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*80
  829. if HOLD == false then
  830. Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*0
  831. Thing:remove()
  832. table.remove(succing,e)
  833. end
  834. end
  835. end
  836. end
  837. end
  838.  
  839. --//=================================\\
  840. --\\=================================//
  841.  
  842.  
  843.  
  844.  
  845.  
  846. --//====================================================\\--
  847. --|| END OF SCRIPT
  848. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement