Advertisement
DarkScriptZEditors

FE Kirby

Dec 2nd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.90 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. wait(0.2)
  84. local p = owner
  85. local char = p.Character
  86. local larm = char["Left Arm"]
  87. local rarm = char["Right Arm"]
  88. local lleg = char["Left Leg"]
  89. local rleg = char["Right Leg"]
  90. local hed = char.Head
  91. local torso = char.Torso
  92. local hum = char.Humanoid
  93. local cam = game.Workspace.CurrentCamera
  94. local root = char.HumanoidRootPart
  95. local rj = root.RootJoint
  96. local deb = false
  97. local shot = 0
  98. local imdead = 0
  99. local stanceToggle = "Idle1"
  100. local l = game:GetService("Lighting")
  101. local rs = game:GetService("RunService").RenderStepped
  102. local hb = game:GetService("RunService").Heartbeat
  103. local Stepped = game:GetService("RunService").Stepped
  104. local weld = Instance.new("Weld",torso)
  105. weld.Part0 = torso
  106. local nom = Instance.new("Sound",torso)
  107. nom.SoundId = "rbxassetid://261732529"
  108. nom.Volume = 1000
  109. local spit = Instance.new("Sound",torso)
  110. spit.SoundId = "rbxassetid://1505749678"
  111. spit.Volume = 1000
  112. local gethit = Instance.new("Sound",torso)
  113. gethit.SoundId = "rbxassetid://1016613877"
  114. gethit.Volume = 1000
  115. local hi = Instance.new("Sound",torso)
  116. hi.SoundId = "rbxassetid://599688682"
  117. hi.Volume = 1000
  118. local flying = true
  119. local deb = true
  120. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  121. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  122. local maxspeed = 50
  123. local speed = 0
  124.  
  125. hum.WalkSpeed = 100
  126. hum.MaxHealth = 5e600
  127. hum.Health = 5e600
  128. field = Instance.new("ForceField",char)
  129. field.Visible = false
  130.  
  131. local duck = Instance.new("Part",torso)
  132. duck.Anchored = true
  133. duck.CanCollide = false
  134. duck.Size = Vector3.new(3,2,6)
  135. duck.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  136. weld.Part1 = duck
  137. weld.C1 = CFrame.new(0,0.1,0) * CFrame.Angles(0,math.rad(180),0)
  138. duck.Anchored = false
  139. local Duckymesh = Instance.new("SpecialMesh",duck)
  140. Duckymesh.MeshType = Enum.MeshType.FileMesh
  141. Duckymesh.Scale = Vector3.new(0.03,0.03,0.03)
  142. Duckymesh.MeshId = "rbxassetid://430307590"
  143. Duckymesh.TextureId = "rbxassetid://430307591"
  144.  
  145. for i,v in pairs(char:GetChildren()) do
  146. if v:IsA("Part") then
  147. v.Transparency = 1;
  148. elseif v:IsA("Hat") then
  149. v:Destroy()
  150. elseif v:IsA("Model") then
  151. v:Destroy()
  152. elseif v:IsA("Hair") then
  153. v:Destroy()
  154. elseif v:IsA("Accessory") then
  155. v:Destroy()
  156. end
  157. end
  158. char.Head.face.Texture = "rbxassetid://0"
  159.  
  160. CV="White"
  161.  
  162. p = owner
  163. char = p.Character
  164. local txt = Instance.new("BillboardGui", char)
  165. txt.Adornee = char .Head
  166. txt.Name = "_status"
  167. txt.Size = UDim2.new(2, 0, 1.2, 0)
  168. txt.StudsOffset = Vector3.new(-9, 8, 0)
  169. local text = Instance.new("TextLabel", txt)
  170. text.Size = UDim2.new(10, 0, 7, 0)
  171. text.FontSize = "Size24"
  172. text.TextScaled = true
  173. text.TextTransparency = 0
  174. text.BackgroundTransparency = 1
  175. text.TextTransparency = 0
  176. text.TextStrokeTransparency = 1
  177. text.Font = "Arcade"
  178. text.TextStrokeColor3 = Color3.fromRGB(255,0,0)
  179.  
  180. v=Instance.new("Part")
  181. v.Name = "ColorBrick"
  182. v.Parent=p.Character
  183. v.FormFactor="Symmetric"
  184. v.Anchored=true
  185. v.CanCollide=false
  186. v.BottomSurface="Smooth"
  187. v.TopSurface="Smooth"
  188. v.Size=Vector3.new(10,5,3)
  189. v.Transparency=1
  190. v.CFrame=char.Torso.CFrame
  191. v.BrickColor=BrickColor.new(CV)
  192. v.Transparency=1
  193. text.TextColor3 = Color3.fromRGB(255,192,203)
  194. v.Shape="Block"
  195. text.Text = "Kirby"
  196.  
  197. --//====================================================\\--
  198. --|| CREATED BY SHACKLUSTER
  199. --\\====================================================//--
  200.  
  201. Player = owner
  202. PlayerGui = Player.PlayerGui
  203. Cam = workspace.CurrentCamera
  204. Backpack = Player.Backpack
  205. Character = Player.Character
  206. Humanoid = Character.Humanoid
  207. RootPart = Character["HumanoidRootPart"]
  208. Torso = Character["Torso"]
  209. Head = Character["Head"]
  210. RightArm = Character["Right Arm"]
  211. LeftArm = Character["Left Arm"]
  212. RightLeg = Character["Right Leg"]
  213. LeftLeg = Character["Left Leg"]
  214. RootJoint = RootPart["RootJoint"]
  215. Neck = Torso["Neck"]
  216. RightShoulder = Torso["Right Shoulder"]
  217. LeftShoulder = Torso["Left Shoulder"]
  218. RightHip = Torso["Right Hip"]
  219. LeftHip = Torso["Left Hip"]
  220. local sick = Instance.new("Sound",Torso)
  221. sick.SoundId = "rbxassetid://291753081"
  222. sick.Looped = true
  223. sick.Volume = 1000
  224. local succing = {}
  225.  
  226. IT = Instance.new
  227. CF = CFrame.new
  228. VT = Vector3.new
  229. RAD = math.rad
  230. C3 = Color3.new
  231. UD2 = UDim2.new
  232. BRICKC = BrickColor.new
  233. ANGLES = CFrame.Angles
  234. EULER = CFrame.fromEulerAnglesXYZ
  235. COS = math.cos
  236. ACOS = math.acos
  237. SIN = math.sin
  238. ASIN = math.asin
  239. ABS = math.abs
  240. MRANDOM = math.random
  241. FLOOR = math.floor
  242.  
  243. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  244. local NEWMESH = IT(MESH)
  245. if MESH == "SpecialMesh" then
  246. NEWMESH.MeshType = MESHTYPE
  247. if MESHID ~= "nil" and MESHID ~= "" then
  248. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  249. end
  250. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  251. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  252. end
  253. end
  254. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  255. NEWMESH.Scale = SCALE
  256. NEWMESH.Parent = PARENT
  257. return NEWMESH
  258. end
  259.  
  260. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  261. local NEWPART = IT("Part")
  262. NEWPART.formFactor = FORMFACTOR
  263. NEWPART.Reflectance = REFLECTANCE
  264. NEWPART.Transparency = TRANSPARENCY
  265. NEWPART.CanCollide = false
  266. NEWPART.Locked = true
  267. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  268. NEWPART.Name = NAME
  269. NEWPART.Size = SIZE
  270. NEWPART.Position = Torso.Position
  271. NEWPART.Material = MATERIAL
  272. NEWPART:BreakJoints()
  273. NEWPART.Parent = PARENT
  274. return NEWPART
  275. end
  276.  
  277.  
  278. --//=================================\\
  279. --|| CUSTOMIZATION
  280. --\\=================================//
  281.  
  282. Class_Name = "Kirby"
  283. Weapon_Name = "Add-ons"
  284.  
  285. Custom_Colors = {
  286. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  287. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  288.  
  289. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  290. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  291. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  292. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  293. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  294.  
  295. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  296. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  297. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  298. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  299. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  300. }
  301.  
  302.  
  303. Player_Size = 1 --Size of the player.
  304. Animation_Speed = 3
  305. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  306.  
  307. local Speed = 16
  308. local Effects2 = {}
  309.  
  310. --//=================================\\
  311. --|| END OF CUSTOMIZATION
  312. --\\=================================//
  313.  
  314. local function weldBetween(a, b)
  315. local weldd = Instance.new("ManualWeld")
  316. weldd.Part0 = a
  317. weldd.Part1 = b
  318. weldd.C0 = CFrame.new()
  319. weldd.C1 = b.CFrame:inverse() * a.CFrame
  320. weldd.Parent = a
  321. return weldd
  322. end
  323.  
  324. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  325. local acs = Instance.new("Part")
  326. acs.CanCollide = false
  327. acs.Anchored = false
  328. acs.Size = Vector3.new(0,0,0)
  329. acs.CFrame = attachmentpart.CFrame
  330. acs.Parent = Character
  331. acs.BrickColor = color
  332. local meshs = Instance.new("SpecialMesh")
  333. meshs.MeshId = mesh
  334. meshs.TextureId = texture
  335. meshs.Parent = acs
  336. meshs.Scale = scale
  337. meshs.Offset = offset
  338. weldBetween(attachmentpart,acs)
  339. end
  340.  
  341. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  342. if TYPE == "Gem" then
  343. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  344. acs.Anchored = false
  345. acs.CanCollide = false
  346. acs.CFrame = PART.CFrame
  347. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  348. weldBetween(PART,acs)
  349. elseif TYPE == "Skull" then
  350. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  351. acs.Anchored = false
  352. acs.CanCollide = false
  353. acs.CFrame = PART.CFrame
  354. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  355. weldBetween(PART,acs)
  356. elseif TYPE == "Eye" then
  357. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  358. acs.Anchored = false
  359. acs.CanCollide = false
  360. acs.CFrame = PART.CFrame
  361. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  362. weldBetween(PART,acs)
  363. end
  364. end
  365.  
  366. --//=================================\\
  367. --|| USEFUL VALUES
  368. --\\=================================//
  369.  
  370. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  371. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  372. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  373. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  374. local CO1 = 0
  375. local CO2 = 0
  376. local CO3 = 0
  377. local CO4 = 0
  378. local CHANGEDEFENSE = 0
  379. local CHANGEDAMAGE = 0
  380. local CHANGEMOVEMENT = 0
  381. local ANIM = "Idle"
  382. local ATTACK = false
  383. local EQUIPPED = false
  384. local HOLD = false
  385. local COMBO = 1
  386. local LASTPOINT = nil
  387. local BLCF = nil
  388. local SCFR = nil
  389. local STAGGERHITANIM = false
  390. local STAGGERANIM = false
  391. local STUNANIM = false
  392. local CRITCHANCENUMBER = 0
  393. local IDLENUMBER = 0
  394. local DONUMBER = 0
  395. local HANDIDLE = false
  396. local SINE = 0
  397. local CHANGE = 2 / Animation_Speed
  398. local WALKINGANIM = false
  399. local WALK = 0
  400. local DISABLEJUMPING = false
  401. local HASBEENBLOCKED = false
  402. local STUNDELAYNUMBER = 0
  403. local MANADELAYNUMBER = 0
  404. local SECONDARYMANADELAYNUMBER = 0
  405. local ROBLOXIDLEANIMATION = IT("Animation")
  406. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  407. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  408. --ROBLOXIDLEANIMATION.Parent = Humanoid
  409. local WEAPONGUI = IT("ScreenGui", nil)
  410. WEAPONGUI.Name = "Weapon GUI"
  411. local WEAPONTOOL = IT("HopperBin", nil)
  412. WEAPONTOOL.Name = Weapon_Name
  413. local Weapon = IT("Model")
  414. Weapon.Name = Weapon_Name
  415. local Effects = IT("Folder", Weapon)
  416. Effects.Name = "Effects"
  417. local ANIMATOR = Humanoid.Animator
  418. local ANIMATE = Character.Animate
  419. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  420. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  421. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  422. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  423. local UNANCHOR = true
  424. local MAGICPARTICLE = "655109389"
  425.  
  426. --//=================================\\
  427. --\\=================================//
  428.  
  429.  
  430. --//=================================\\
  431. --|| DEBUFFS / BUFFS
  432. --\\=================================//
  433.  
  434. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  435. DEFENSECHANGE1.Name = "ChangeDefense"
  436. DEFENSECHANGE1.Value = 0
  437.  
  438. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  439. MOVEMENTCHANGE1.Name = "ChangeMovement"
  440. MOVEMENTCHANGE1.Value = 0
  441.  
  442. --//=================================\\
  443. --\\=================================//
  444.  
  445.  
  446.  
  447.  
  448.  
  449. --//=================================\\
  450. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  451. --\\=================================//
  452.  
  453. ArtificialHB = Instance.new("BindableEvent", script)
  454. ArtificialHB.Name = "ArtificialHB"
  455.  
  456. script:WaitForChild("ArtificialHB")
  457.  
  458. frame = Frame_Speed
  459. tf = 0
  460. allowframeloss = false
  461. tossremainder = false
  462. lastframe = tick()
  463. script.ArtificialHB:Fire()
  464.  
  465. game:GetService("RunService").Heartbeat:connect(function(s, p)
  466. tf = tf + s
  467. if tf >= frame then
  468. if allowframeloss then
  469. script.ArtificialHB:Fire()
  470. lastframe = tick()
  471. else
  472. for i = 1, math.floor(tf / frame) do
  473. script.ArtificialHB:Fire()
  474. end
  475. lastframe = tick()
  476. end
  477. if tossremainder then
  478. tf = 0
  479. else
  480. tf = tf - frame * math.floor(tf / frame)
  481. end
  482. end
  483. end)
  484.  
  485. --//=================================\\
  486. --\\=================================//
  487.  
  488.  
  489.  
  490.  
  491.  
  492. --//=================================\\
  493. --|| SOME FUNCTIONS
  494. --\\=================================//
  495.  
  496. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  497. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  498. end
  499.  
  500. function PositiveAngle(NUMBER)
  501. if NUMBER >= 0 then
  502. NUMBER = 0
  503. end
  504. return NUMBER
  505. end
  506.  
  507. function NegativeAngle(NUMBER)
  508. if NUMBER <= 0 then
  509. NUMBER = 0
  510. end
  511. return NUMBER
  512. end
  513.  
  514. function Swait(NUMBER)
  515. if NUMBER == 0 or NUMBER == nil then
  516. ArtificialHB.Event:wait()
  517. else
  518. for i = 1, NUMBER do
  519. ArtificialHB.Event:wait()
  520. end
  521. end
  522. end
  523.  
  524. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  525. local label = IT("TextLabel")
  526. label.BackgroundTransparency = 1
  527. label.Size = UD2(1, 0, 1, 0)
  528. label.Position = UD2(0, 0, 0, 0)
  529. label.TextColor3 = C3(255, 255, 255)
  530. label.TextStrokeTransparency = STROKETRANSPARENCY
  531. label.TextTransparency = TRANSPARENCY
  532. label.FontSize = TEXTFONTSIZE
  533. label.Font = TEXTFONT
  534. label.BorderSizePixel = BORDERSIZEPIXEL
  535. label.TextScaled = true
  536. label.Text = TEXT
  537. label.Name = NAME
  538. label.Parent = PARENT
  539. return label
  540. end
  541.  
  542. function NoOutlines(PART)
  543. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  544. end
  545.  
  546.  
  547. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  548. local NEWWELD = IT(TYPE)
  549. NEWWELD.Part0 = PART0
  550. NEWWELD.Part1 = PART1
  551. NEWWELD.C0 = C0
  552. NEWWELD.C1 = C1
  553. NEWWELD.Parent = PARENT
  554. return NEWWELD
  555. end
  556.  
  557. function CreateSound(ID, PARENT, VOLUME, PITCH)
  558. local NEWSOUND = nil
  559. coroutine.resume(coroutine.create(function()
  560. NEWSOUND = IT("Sound", PARENT)
  561. NEWSOUND.Volume = VOLUME
  562. NEWSOUND.Pitch = PITCH
  563. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  564. Swait()
  565. NEWSOUND:play()
  566. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  567. end))
  568. return NEWSOUND
  569. end
  570.  
  571. --//=================================\\
  572. --\\=================================//
  573.  
  574.  
  575. --//=================================\\
  576. --|| WEAPON CREATION
  577. --\\=================================//
  578.  
  579. if Player_Size ~= 1 then
  580. for _, v in pairs (Weapon:GetChildren()) do
  581. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  582. local p1 = v.Part1
  583. v.Part1 = nil
  584. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  585. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  586. v.Part1 = p1
  587. elseif v.ClassName == "Part" then
  588. for _, b in pairs (v:GetChildren()) do
  589. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  590. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  591. end
  592. end
  593. end
  594. end
  595. end
  596.  
  597. for _, c in pairs(Weapon:GetChildren()) do
  598. if c.ClassName == "Part" then
  599. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  600. end
  601. end
  602.  
  603. Weapon.Parent = Character
  604.  
  605. Humanoid.Died:connect(function()
  606. ATTACK = true
  607. end)
  608.  
  609. print(Class_Name.." loaded.")
  610.  
  611. --//=================================\\
  612. --\\=================================//
  613.  
  614.  
  615. local backpack = IT("Part",Weapon)
  616. backpack.Size = VT(0.15,0.15,0.15)
  617. local mesh = IT("SpecialMesh",backpack)
  618. mesh.MeshId = "rbxassetid://0"
  619. mesh.TextureId = "http://www.roblox.com/asset/?id=0"
  620. backpack.CFrame = Torso.CFrame * CF(0,0.2,1)
  621. backpack.BrickColor = BRICKC("Black")
  622. weldBetween(Torso,backpack)
  623.  
  624. local hose = IT("Part",Weapon)
  625. hose.Size = VT(0.15,0.15,0.15)
  626. local mesh = IT("SpecialMesh",hose)
  627. mesh.MeshId = "http://www.roblox.com/asset/?id=0"
  628. mesh.TextureId = "http://www.roblox.com/asset/?id=0"
  629. mesh.Scale = VT(2,2,2)
  630. mesh.Offset = VT(0, -0.4, -0.7)
  631. hose.CFrame = Torso.CFrame * CF(1.5,0.5,0.2) * ANGLES(RAD(90),RAD(35),RAD(180))
  632. hose.BrickColor = BRICKC("Black")
  633. weldBetween(Torso,hose)
  634.  
  635. local succ = IT("Part",Weapon)
  636. succ.Size = VT(2,2,2)
  637. succ.CanCollide = false
  638. succ.CFrame = Torso.CFrame * CF(0,-1,-2) * ANGLES(RAD(90),RAD(0),RAD(180))
  639. succ.Transparency = 1
  640. succ.BrickColor = BRICKC("Gold")
  641. weldBetween(Torso,succ)
  642.  
  643. for _, c in pairs(Weapon:GetChildren()) do
  644. if c.ClassName == "Part" then
  645. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  646. end
  647. end
  648.  
  649. local EyeSizes={
  650. NumberSequenceKeypoint.new(0,0.5,0),
  651. NumberSequenceKeypoint.new(1,0.2,0)
  652. }
  653. local EyeTrans={
  654. NumberSequenceKeypoint.new(0,0,0),
  655. NumberSequenceKeypoint.new(1,1,0)
  656. }
  657. local PE=Instance.new("ParticleEmitter")
  658. PE.LightEmission=0.3
  659. PE.Size=NumberSequence.new(EyeSizes)
  660. PE.Transparency=NumberSequence.new(EyeTrans)
  661. PE.Rotation=NumberRange.new(0,360)
  662. PE.LockedToPart = false
  663. PE.Speed = NumberRange.new(0,0,0)
  664. PE.ZOffset = 0.3
  665. PE.Rate = 999
  666. PE.VelocitySpread = 25
  667. PE.Name = "Particles"
  668.  
  669. function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
  670. local particle = nil
  671. coroutine.resume(coroutine.create(function(PART)
  672. particle = PE:Clone()
  673. Swait()
  674. particle.Rate = 999
  675. particle.Parent = art
  676. particle.Acceleration = accel
  677. if type == "Fire" then
  678. local EyeSizes={
  679. NumberSequenceKeypoint.new(0,size,size/2),
  680. NumberSequenceKeypoint.new(1,size/4,size/8)
  681. }
  682. particle.Size = NumberSequence.new(EyeSizes)
  683. elseif type == "Smoke" then
  684. local EyeSizes={
  685. NumberSequenceKeypoint.new(0,size/5,0),
  686. NumberSequenceKeypoint.new(1,size*2,0.5)
  687. }
  688. particle.Size = NumberSequence.new(EyeSizes)
  689. elseif type == "Solid" then
  690. local EyeSizes={
  691. NumberSequenceKeypoint.new(0,size,0),
  692. NumberSequenceKeypoint.new(1,size,0)
  693. }
  694. particle.Size = NumberSequence.new(EyeSizes)
  695. end
  696. particle.Lifetime=NumberRange.new(lifetime)
  697. particle.Drag = drag
  698. if locked == true then
  699. particle.LockedToPart = true
  700. end
  701. particle.Speed = NumberRange.new(speed*0.8,speed)
  702. particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
  703. particle.Enabled = isenabledbydefault
  704. particle.Color = ColorSequence.new(Color3.fromRGB(255, 215, 0))
  705. end))
  706. return particle
  707. end
  708.  
  709. local poop = CreateParticles(succ,VT(0,0,0),5,2,"Smoke",false,false,5,35)
  710. local poop2 = CreateParticles(succ,VT(0,0,0),5,1,"Smoke",false,false,2,15)
  711. --//=================================\\
  712. --|| DAMAGING
  713. --\\=================================//
  714.  
  715. function succnearest(position,range)
  716. for i,v in ipairs(workspace:GetChildren()) do
  717. local body = v:GetChildren()
  718. for part = 1, #body do
  719. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  720. if(body[part].Position - position).Magnitude < range then
  721. local bv = Instance.new("BodyVelocity")
  722. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  723. bv.velocity = CF(body[part].Position,succ.Position).lookVector*80
  724. bv.Parent = body[part]
  725. bv.Name = "SUCC"
  726. game:GetService("Debris"):AddItem(bv, 0.1)
  727. end
  728. end
  729. end
  730. if v.ClassName == "Part" then
  731. if v.Anchored == false and (v.Position - position).Magnitude < range then
  732. local bv = Instance.new("BodyVelocity")
  733. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  734. bv.velocity = CF(v.Position,succ.Position).lookVector*80
  735. bv.Parent = v
  736. bv.Name = "SUCC"
  737. game:GetService("Debris"):AddItem(bv, 0.1)
  738. end
  739. end
  740. end
  741. end
  742.  
  743. function cover(position,range)
  744. for i,v in ipairs(workspace:GetChildren()) do
  745. local body = v:GetChildren()
  746. for part = 1, #body do
  747. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  748. if(body[part].Position - position).Magnitude < range then
  749. CreateParticles(body[part],VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
  750. if v:FindFirstChild("Humanoid") then
  751. v.Humanoid.PlatformStand = true
  752. end
  753. end
  754. end
  755. end
  756. if v.ClassName == "Part" then
  757. if v.Anchored == false and (v.Position - position).Magnitude < range then
  758. CreateParticles(v,VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
  759. end
  760. end
  761. end
  762. end
  763.  
  764. function shield()
  765. coroutine.resume(coroutine.create(function()
  766. local woa = IT("Part",Effects)
  767. woa.Size = VT(2.63, 2.69, 0.56)
  768. local mesh = IT("SpecialMesh",woa)
  769. mesh.MeshType = "FileMesh"
  770. mesh.MeshId = "rbxassetid://470689293"
  771. mesh.TextureId = "rbxassetid://26884682"
  772. mesh.Scale = VT(0.006, 0.006, 0.004)
  773. woa.CFrame = RootPart.CFrame * CF(0,0,-5)
  774. local woosh = woa.Touched:Connect(function(hit)
  775. if hit.Parent.ClassName == "Model" then
  776. hit.Parent:BreakJoints()
  777. gethit:Play()
  778. elseif hit.ClassName == "Part" and hit.Anchored == false then
  779. hit:remove()
  780. end
  781. end)
  782. local paw = woa.Touched:Connect(function(hit)
  783. if hit.Parent.ClassName == "Model" then
  784. woa:remove()
  785. hit.Parent:BreakJoints()
  786. gethit:Play()
  787. end
  788. end)
  789. woosh:disconnect()
  790. woa.Anchored = false
  791. local bv = Instance.new("BodyVelocity")
  792. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  793. bv.velocity = RootPart.CFrame.lookVector*150
  794. bv.Parent = woa
  795. bv.Name = "DASH"
  796. end))
  797. end
  798.  
  799. function cough()
  800. spit:Play()
  801. shield()
  802. end
  803.  
  804. --//=================================\\
  805. --|| ATTACK FUNCTIONS AND STUFF
  806. --\\=================================//
  807.  
  808. function CheckTableForString(Table, String)
  809. for i, v in pairs(Table) do
  810. if string.find(string.lower(String), string.lower(v)) then
  811. return true
  812. end
  813. end
  814. return false
  815. end
  816.  
  817. function CheckIntangible(Hit)
  818. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  819. if Hit and Hit.Parent then
  820. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  821. return true
  822. end
  823. end
  824. return false
  825. end
  826.  
  827. Debris = game:GetService("Debris")
  828.  
  829. function CastRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  830. local Direction = CFrame.new(StartPos, Vec).lookVector
  831. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  832. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  833. if RayHit and CheckIntangible(RayHit) then
  834. if DelayIfHit then
  835. wait()
  836. end
  837. RayHit, RayPos, RayNormal = CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  838. end
  839. return RayHit, RayPos, RayNormal
  840. end
  841.  
  842. function turnto(pos,part)
  843. part.CFrame = CF(part.Position,VT(pos.X,RootPart.Position.Y,pos.Z))
  844. end
  845.  
  846. function vacuum()
  847. sick:Play()
  848. local nado = IT("Part")
  849. local mesh = IT("SpecialMesh",nado)
  850. mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
  851. nado.Transparency = 0.5
  852. nado.CanCollide = false
  853. nado.Anchored = true
  854. local loop = 0
  855. succing = {}
  856. local harm = succ.Touched:Connect(function(hit)
  857. if hit.Anchored == false then
  858. hit:remove()
  859. nom:Play()
  860. end
  861. end)
  862. repeat
  863. Swait()
  864. loop = loop + 75
  865. nado.Parent = Effects
  866. local RayHit,RayPos = CastRay(succ.Position, Mouse.Hit.p, 1000, Character, false)
  867. local distance = (succ.Position - RayPos).magnitude
  868. mesh.Scale = VT(distance/12,distance/3.2,distance/12)
  869. nado.CFrame = CFrame.new(succ.Position, RayPos) * CFrame.new(0, 0, -distance/2) * ANGLES(RAD(-90),RAD(loop),RAD(0))
  870. turnto(Mouse.Hit.p,RootPart)
  871. succnearest(RayPos,distance/2.5)
  872. if RayHit ~= nil then
  873. if RayHit.Anchored == false then
  874. local bv = Instance.new("BodyVelocity")
  875. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  876. bv.velocity = CF(RayHit.Position,succ.Position).lookVector*80
  877. bv.Parent = RayHit
  878. bv.Name = "SUCC"
  879. game:GetService("Debris"):AddItem(bv, 0.1)
  880. end
  881. end
  882. local TotalSuccs = math.ceil(distance / 65)
  883. local Direction = CFrame.new(RayPos, succ.Position).lookVector
  884. for i = 1, TotalSuccs do
  885. local NewPos = (RayPos + (Direction * (distance * (i / TotalSuccs))))
  886. succnearest(NewPos,distance/(i*2.5))
  887. end
  888. until HOLD == false
  889. if #succing>0 then
  890. for e=1,#succing do
  891. if succing[e]~=nil then
  892. local Thing=succing[e]
  893. Thing:remove()
  894. table.remove(succing,e)
  895. end
  896. end
  897. end
  898. succing = {}
  899. harm:disconnect()
  900. nado:remove()
  901. sick:Stop()
  902. end
  903.  
  904. --//=================================\\
  905. --|| ASSIGN THINGS TO KEYS
  906. --\\=================================//
  907.  
  908. Humanoid.Changed:connect(function(Jump)
  909. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  910. Humanoid.Jump = false
  911. end
  912. end)
  913.  
  914. function MouseDown(Mouse)
  915. HOLD = true
  916. vacuum()
  917. end
  918.  
  919. function MouseUp(Mouse)
  920. HOLD = false
  921. end
  922.  
  923. function KeyDown(Key)
  924. if Key == "e" and ATTACK == false then
  925. if imdead == 0 then
  926. cough()
  927. end
  928. end
  929. if Key == "f" then
  930. if imdead == 0 then
  931. hi:Play()
  932. end
  933. end
  934. if Key == "r" then
  935. if imdead == 0 then
  936. Fly()
  937. end
  938. end
  939. end
  940.  
  941. function Fly()
  942. local bg = Instance.new("BodyGyro", torso)
  943. bg.P = 9e4
  944. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  945. bg.cframe = torso.CFrame
  946. local bv = Instance.new("BodyVelocity", torso)
  947. bv.velocity = Vector3.new(0,0.1,0)
  948. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  949. repeat wait()
  950. p.Character.Humanoid.PlatformStand = true
  951. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  952. speed = speed+.5+(speed/maxspeed)
  953. if speed > maxspeed then
  954. speed = maxspeed
  955. end
  956. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  957. speed = speed-1
  958. if speed < 0 then
  959. speed = 0
  960. end
  961. end
  962. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  963. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  964. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  965. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  966. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  967. else
  968. bv.velocity = Vector3.new(0,0.1,0)
  969. end
  970. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  971. until not flying
  972. ctrl = {f = 0, b = 0, l = 0, r = 0}
  973. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  974. speed = 0
  975. bg:Destroy()
  976. bv:Destroy()
  977. p.Character.Humanoid.PlatformStand = false
  978. end
  979. mouse.KeyDown:connect(function(key)
  980. if key:lower() == "r" then
  981. if flying then flying = false
  982. else
  983. flying = true
  984. Fly()
  985. end
  986. elseif key:lower() == "w" then
  987. ctrl.f = 3
  988. elseif key:lower() == "s" then
  989. ctrl.b = -3
  990. elseif key:lower() == "a" then
  991. ctrl.l = -3
  992. elseif key:lower() == "d" then
  993. ctrl.r = 3
  994. end
  995. end)
  996. mouse.KeyUp:connect(function(key)
  997. if key:lower() == "w" then
  998. ctrl.f = 0
  999. elseif key:lower() == "s" then
  1000. ctrl.b = 0
  1001. elseif key:lower() == "a" then
  1002. ctrl.l = 0
  1003. elseif key:lower() == "d" then
  1004. ctrl.r = 0
  1005. end
  1006. end)
  1007.  
  1008. function KeyUp(Key)
  1009. end
  1010.  
  1011. Mouse.Button1Down:connect(function(NEWKEY)
  1012. MouseDown(NEWKEY)
  1013. end)
  1014. Mouse.Button1Up:connect(function(NEWKEY)
  1015. MouseUp(NEWKEY)
  1016. end)
  1017. Mouse.KeyDown:connect(function(NEWKEY)
  1018. KeyDown(NEWKEY)
  1019. end)
  1020. Mouse.KeyUp:connect(function(NEWKEY)
  1021. KeyUp(NEWKEY)
  1022. end)
  1023.  
  1024. --//=================================\\
  1025. --\\=================================//
  1026.  
  1027.  
  1028. function unanchor()
  1029. if UNANCHOR == true then
  1030. g = Character:GetChildren()
  1031. for i = 1, #g do
  1032. if g[i].ClassName == "Part" then
  1033. g[i].Anchored = false
  1034. end
  1035. end
  1036. end
  1037. end
  1038.  
  1039.  
  1040. --//=================================\\
  1041. --|| WRAP THE WHOLE SCRIPT UP
  1042. --\\=================================//
  1043. local Music = Instance.new("Sound")
  1044.  
  1045. Music.Name = "Sound"
  1046. Music.SoundId = "http://roblox.com/asset/?id=235817096"
  1047. Music.Volume = 10
  1048. Music.Looped = true
  1049. Music.Parent = Torso
  1050. Music:play()
  1051.  
  1052. char.Humanoid.Died:connect(function()
  1053. imdead = 1
  1054. Music.SoundId = "http://roblox.com/asset/?id=715082158"
  1055. Music.Volume = 10
  1056. Music.Looped = false
  1057. Music:play()
  1058. hi:Stop()
  1059. end)
  1060.  
  1061. Humanoid.Changed:connect(function(Jump)
  1062. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1063. Humanoid.Jump = false
  1064. end
  1065. end)
  1066.  
  1067. while true do
  1068. Swait()
  1069. if #Effects2>0 then
  1070. for e=1,#Effects2 do
  1071. if Effects2[e]~=nil then
  1072. local Thing=Effects2[e]
  1073. if Thing~=nil then
  1074. local Part=Thing[1]
  1075. local Mode=Thing[2]
  1076. local Delay=Thing[3]
  1077. local IncX=Thing[4]
  1078. local IncY=Thing[5]
  1079. local IncZ=Thing[6]
  1080. local Part2=Thing[8]
  1081. if Thing[1].Transparency<=1 then
  1082. if Thing[2]=="Block1" then
  1083. Thing[1].CFrame=Thing[1].CFrame
  1084. Mesh=Thing[1].Mesh
  1085. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1086. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1087. elseif Thing[2]=="Cylinder" then
  1088. Mesh=Thing[1].Mesh
  1089. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1090. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1091. elseif Thing[2]=="Blood" then
  1092. Mesh=Thing[7]
  1093. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1094. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1095. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1096. elseif Thing[2]=="Elec" then
  1097. Mesh=Thing[1].Mesh
  1098. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1099. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1100. elseif Thing[2]=="Disappear" then
  1101. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1102. end
  1103. else
  1104. Part.Parent=nil
  1105. table.remove(Effects2,e)
  1106. end
  1107. end
  1108. end
  1109. end
  1110. end
  1111. unanchor()
  1112. if Rooted == false then
  1113. Disable_Jump = false
  1114. Humanoid.WalkSpeed = Speed
  1115. elseif Rooted == true then
  1116. Disable_Jump = true
  1117. Humanoid.WalkSpeed = 0
  1118. end
  1119. if sick == nil then
  1120. sick = Instance.new("Sound",Torso)
  1121. sick.SoundId = "rbxassetid://319444224"
  1122. sick.Looped = true
  1123. sick.Pitch = 1
  1124. sick.Volume = 1
  1125. end
  1126. if #succing>0 then
  1127. for e=1,#succing do
  1128. if succing[e]~=nil then
  1129. local Thing=succing[e]
  1130. Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*80
  1131. if HOLD == false then
  1132. Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*0
  1133. Thing:remove()
  1134. table.remove(succing,e)
  1135. end
  1136. end
  1137. end
  1138. end
  1139. end
  1140.  
  1141. --//=================================\\
  1142. --\\=================================//
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148. --//====================================================\\--
  1149. --|| END OF SCRIPT
  1150. --\\====================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement