Advertisement
Josemmoya

switch

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