good_scripter

Untitled

Jun 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.72 KB | None | 0 0
  1. print("FE code by Starzozero, Thanks to him!")
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code by Mokiros, Edited by StarzoZero")
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86.  
  87. ----Sandboxed game object that allows the usage of client-side methods and services
  88. --Real game object
  89. local _rg = game
  90.  
  91. --Metatable for fake service
  92. local fsmt = {
  93. __index = function(self,k)
  94. local s = rawget(self,"_RealService")
  95. if s then
  96. return typeof(s[k])=="function"
  97. and function(_,...)return s[k](s,...)end or s[k]
  98. end
  99. end,
  100. __newindex = function(self,k,v)
  101. local s = rawget(self,"_RealService")
  102. if s then s[k]=v end
  103. end
  104. }
  105. local function FakeService(t,RealService)
  106. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107. return setmetatable(t,fsmt)
  108. end
  109.  
  110. --Fake game object
  111. local g = {
  112. GetService = function(self,s)
  113. return rawget(self,s) or _rg:GetService(s)
  114. end,
  115. Players = FakeService({
  116. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. RunService = FakeService({
  121. _btrs = {},
  122. RenderStepped = _rg:GetService("RunService").Heartbeat,
  123. BindToRenderStep = function(self,name,_,fun)
  124. self._btrs[name] = self.Heartbeat:Connect(fun)
  125. end,
  126. UnbindFromRenderStep = function(self,name)
  127. self._btrs[name]:Disconnect()
  128. end,
  129. },"RunService")
  130. }
  131. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  132. g.service = g.GetService
  133. FakeService(g,game)
  134. --Changing owner to fake player object to support owner:GetMouse()
  135. game,owner = g,g.Players.LocalPlayer
  136. end
  137.  
  138. function giant(p, size)
  139. local pchar = p.Character
  140. if pchar then
  141. local function scale(chr,scl)
  142.  
  143. for _,v in pairs(pchar:GetChildren()) do
  144. if v:IsA("Hat") then
  145. v:Clone()
  146. v.Parent = game.Lighting
  147. end
  148. end
  149.  
  150. local Head = chr['Head']
  151. local Torso = chr['Torso']
  152. local LA = chr['Left Arm']
  153. local RA = chr['Right Arm']
  154. local LL = chr['Left Leg']
  155. local RL = chr['Right Leg']
  156. local HRP = chr['HumanoidRootPart']
  157.  
  158. wait(0.1)
  159.  
  160. Head.formFactor = 3
  161. Torso.formFactor = 3
  162. LA.formFactor = 3
  163. RA.formFactor = 3
  164. LL.formFactor = 3
  165. RL.formFactor = 3
  166. HRP.formFactor = 3
  167.  
  168. Head.Size = Vector3.new(scl * 2, scl, scl)
  169. Torso.Size = Vector3.new(scl * 2, scl * 2, scl)
  170. LA.Size = Vector3.new(scl, scl * 2, scl)
  171. RA.Size = Vector3.new(scl, scl * 2, scl)
  172. LL.Size = Vector3.new(scl, scl * 2, scl)
  173. RL.Size = Vector3.new(scl, scl * 2, scl)
  174. HRP.Size = Vector3.new(scl * 2, scl * 2, scl)
  175.  
  176. local Motor1 = Instance.new('Motor6D', Torso)
  177. Motor1.Part0 = Torso
  178. Motor1.Part1 = Head
  179. Motor1.C0 = CFrame.new(0, 1 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  180. Motor1.C1 = CFrame.new(0, -0.5 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  181. Motor1.Name = "Neck"
  182.  
  183. local Motor2 = Instance.new('Motor6D', Torso)
  184. Motor2.Part0 = Torso
  185. Motor2.Part1 = LA
  186. Motor2.C0 = CFrame.new(-1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  187. Motor2.C1 = CFrame.new(0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  188. Motor2.Name = "Left Shoulder"
  189.  
  190. local Motor3 = Instance.new('Motor6D', Torso)
  191. Motor3.Part0 = Torso
  192. Motor3.Part1 = RA
  193. Motor3.C0 = CFrame.new(1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  194. Motor3.C1 = CFrame.new(-0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  195. Motor3.Name = "Right Shoulder"
  196.  
  197. local Motor4 = Instance.new('Motor6D', Torso)
  198. Motor4.Part0 = Torso
  199. Motor4.Part1 = LL
  200. Motor4.C0 = CFrame.new(-1 * scl, -1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  201. Motor4.C1 = CFrame.new(-0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  202. Motor4.Name = "Left Hip"
  203.  
  204. local Motor5 = Instance.new('Motor6D', Torso)
  205. Motor5.Part0 = Torso
  206. Motor5.Part1 = RL
  207. Motor5.C0 = CFrame.new(1 * scl, -1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  208. Motor5.C1 = CFrame.new(0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  209. Motor5.Name = "Right Hip"
  210.  
  211. local Motor6 = Instance.new('Motor6D', HRP)
  212. Motor6.Part0 = HRP
  213. Motor6.Part1 = Torso
  214. Motor6.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  215. Motor6.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  216.  
  217. end
  218.  
  219. scale(pchar, size)
  220. pchar.Humanoid.WalkSpeed = 15 * size
  221.  
  222. for _,v in pairs(game.Lighting:GetChildren()) do
  223. if v:IsA("Hat") then
  224. v.Parent = pchar
  225. end
  226. end
  227. end
  228. end
  229.  
  230. local plr = game.Players.LocalPlayer
  231. giant(plr,1)
  232.  
  233.  
  234. local csize = 1
  235.  
  236. local sgui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  237. local base = Instance.new("Frame", sgui)
  238. base.BackgroundTransparency = 1
  239. base.Size = UDim2.new(0, 110, 0, 200)
  240. base.Position = UDim2.new(1, -120, 1, -180)
  241. local indicator = Instance.new("TextLabel", base)
  242. indicator.Size = UDim2.new(1, 0, 0, 25)
  243. indicator.TextColor3 = Color3.new(1, 1, 1)
  244. indicator.BackgroundTransparency = 0
  245. indicator.FontSize = Enum.FontSize.Size18
  246. indicator.Font = Enum.Font.SourceSans
  247. indicator.Text = "Current Size: 3"
  248. local PlusOne = Instance.new("TextButton", base)
  249. PlusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  250. PlusOne.Position = UDim2.new(0, 0, 0, 40)
  251. PlusOne.Size = UDim2.new(1, 0, 0.5, -50)
  252. PlusOne.BorderSizePixel = 2
  253. PlusOne.Font = Enum.Font.SourceSansBold
  254. PlusOne.FontSize = Enum.FontSize.Size24
  255. PlusOne.Text = "+.1 Size"
  256. local MinusOne = Instance.new("TextButton", base)
  257. MinusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  258. MinusOne.Position = UDim2.new(0, 0, 0.5, 10)
  259. MinusOne.Size = UDim2.new(1, 0, 0.5, -50)
  260. MinusOne.Text = "-.1 Size"
  261. MinusOne.BorderSizePixel = 2
  262. MinusOne.Font = Enum.Font.SourceSansBold
  263. MinusOne.FontSize = Enum.FontSize.Size24
  264.  
  265. PlusOne.MouseButton1Down:connect(function()
  266. csize = csize + .1
  267. giant(plr, csize)
  268. indicator.Text = "Current Size: "..tostring(csize)
  269. end)
  270.  
  271. MinusOne.MouseButton1Down:connect(function()
  272. csize = csize - .1
  273. giant(plr, csize)
  274. indicator.Text = "Current Size: "..tostring(csize)
  275. end)
  276.  
  277. Character = game.Players.LocalPlayer.Character
  278. Head = Character.Head
  279.  
  280. CV="Blue"
  281. p = game.Players.LocalPlayer
  282. char = p.Character
  283. local txt = Instance.new("BillboardGui", char)
  284. txt.Adornee = char .Head
  285. txt.Name = "_status"
  286. txt.Size = UDim2.new(2, 0, 1.2, 0)
  287. txt.StudsOffset = Vector3.new(-9, 8, 0)
  288. local text = Instance.new("TextLabel", txt)
  289. text.Size = UDim2.new(10, 0, 7, 0)
  290. text.FontSize = "Size24"
  291. text.TextScaled = true
  292. text.TextTransparency = 0
  293. text.BackgroundTransparency = 1
  294. text.TextTransparency = 0
  295. text.TextStrokeTransparency = 0
  296. text.Font = "Cartoon"
  297. text.TextStrokeColor3 = Color3.new(10,0,0)
  298.  
  299. v=Instance.new("Part")
  300. v.Name = "ColorBrick"
  301. v.Parent=p.Character
  302. v.FormFactor="Symmetric"
  303. v.Anchored=true
  304. v.CanCollide=false
  305. v.BottomSurface="Smooth"
  306. v.TopSurface="Smooth"
  307. v.Size=Vector3.new(10,5,3)
  308. v.Transparency=1
  309. v.CFrame=char.Torso.CFrame
  310. v.BrickColor=BrickColor.new(CV)
  311. v.Transparency=1
  312. text.TextColor3 = Color3.new(10,0,0)
  313. v.Shape="Block"
  314. text.Text = "julio with a flare inverted "
  315.  
  316. local s = Instance.new("Sound",char)
  317. s.Name = "BGMusic"
  318. s.SoundId = "rbxassetid://813670691"
  319. s.Pitch = 1
  320. s.Volume = 4
  321. s.Looped = true
  322. s.archivable = false
  323. s.Parent = char.Head
  324. wait(0.1)
  325. s:play()
  326.  
  327.  
  328. --[[Nocturna_A._Alteriano_Night.Owl.Inc]]--
  329. --[[Edited by whenyoudiev3]]--
  330. wait(1 / 60)
  331. Effects = { }
  332. local Player = game.Players.localPlayer
  333. local Character = Player.Character
  334. local Humanoid = Character.Humanoid
  335. local mouse = Player:GetMouse()
  336. local m = Instance.new('Model', Character)
  337. m.Name = "WeaponModel"
  338. local LeftArm = Character["Left Arm"]
  339. local RightArm = Character["Right Arm"]
  340. local LeftLeg = Character["Left Leg"]
  341. local RightLeg = Character["Right Leg"]
  342. local Head = Character.Head
  343. local Torso = Character.Torso
  344. local cam = game.Workspace.CurrentCamera
  345. local RootPart = Character.HumanoidRootPart
  346. local RootJoint = RootPart.RootJoint
  347. local equipped = false
  348. local attack = false
  349. local Anim = 'Idle'
  350. local idle = 0
  351. local attacktype = 1
  352. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  353. local velocity = RootPart.Velocity.y
  354. local sine = 0
  355. local change = 1
  356. local grabbed = false
  357. local cn = CFrame.new
  358. local mr = math.rad
  359. local angles = CFrame.Angles
  360. local ud = UDim2.new
  361. local c3 = Color3.new
  362. Instance.new("ForceField", game.Players.LocalPlayer.Character)
  363.  
  364. Humanoid.Animator.Parent = nil
  365. Character.Animate.Parent = nil
  366.  
  367. local newMotor = function(part0, part1, c0, c1)
  368. local w = Instance.new('Motor', part0)
  369. w.Part0 = part0
  370. w.Part1 = part1
  371. w.C0 = c0
  372. w.C1 = c1
  373. return w
  374. end
  375.  
  376. function clerp(a, b, t)
  377. return a:lerp(b, t)
  378. end
  379.  
  380. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  381. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  382.  
  383. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  384. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  385. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  386. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  387. RootJoint.C1 = CFrame.new(0, 0, 0)
  388. RootJoint.C0 = CFrame.new(0, 0, 0)
  389. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  390. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  391.  
  392. local rarmc1 = RW.C1
  393. local larmc1 = LW.C1
  394. local rlegc1 = RH.C1
  395. local llegc1 = LH.C1
  396.  
  397. local resetc1 = false
  398.  
  399. function PlayAnimationFromTable(table, speed, bool)
  400. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  401. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  402. RW.C0 = clerp(RW.C0, table[3], speed)
  403. LW.C0 = clerp(LW.C0, table[4], speed)
  404. RH.C0 = clerp(RH.C0, table[5], speed)
  405. LH.C0 = clerp(LH.C0, table[6], speed)
  406. if bool == true then
  407. if resetc1 == false then
  408. resetc1 = true
  409. RootJoint.C1 = RootJoint.C1
  410. Torso.Neck.C1 = Torso.Neck.C1
  411. RW.C1 = rarmc1
  412. LW.C1 = larmc1
  413. RH.C1 = rlegc1
  414. LH.C1 = llegc1
  415. end
  416. end
  417. end
  418.  
  419. Char = char
  420.  
  421. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  422.  
  423. ArtificialHB = Instance.new("BindableEvent", script)
  424. ArtificialHB.Name = "Heartbeat"
  425.  
  426. script:WaitForChild("Heartbeat")
  427.  
  428. frame = 1 / 30
  429. tf = 0
  430. allowframeloss = false
  431. tossremainder = false
  432. lastframe = tick()
  433. script.Heartbeat:Fire()
  434.  
  435. game:GetService("RunService").Heartbeat:connect(function(s, p)
  436. tf = tf + s
  437. if tf >= frame then
  438. if allowframeloss then
  439. script.Heartbeat:Fire()
  440. lastframe = tick()
  441. else
  442. for i = 1, math.floor(tf / frame) do
  443. script.Heartbeat:Fire()
  444. end
  445. lastframe = tick()
  446. end
  447. if tossremainder then
  448. tf = 0
  449. else
  450. tf = tf - frame * math.floor(tf / frame)
  451. end
  452. end
  453. end)
  454.  
  455. function swait(num)
  456. if num == 0 or num == nil then
  457. ArtificialHB.Event:wait()
  458. else
  459. for i = 0, num do
  460. ArtificialHB.Event:wait()
  461. end
  462. end
  463. end
  464.  
  465. local RbxUtility = LoadLibrary("RbxUtility")
  466. local Create = RbxUtility.Create
  467.  
  468. function RemoveOutlines(part)
  469. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  470. end
  471.  
  472. CFuncs = {
  473. ["Part"] = {
  474. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  475. local Part = Create("Part"){
  476. Parent = Parent,
  477. Reflectance = Reflectance,
  478. Transparency = Transparency,
  479. CanCollide = false,
  480. Locked = true,
  481. BrickColor = BrickColor.new(tostring(BColor)),
  482. Name = Name,
  483. Size = Size,
  484. Material = Material,
  485. }
  486. RemoveOutlines(Part)
  487. return Part
  488. end;
  489. };
  490.  
  491. ["Mesh"] = {
  492. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  493. local Msh = Create(Mesh){
  494. Parent = Part,
  495. Offset = OffSet,
  496. Scale = Scale,
  497. }
  498. if Mesh == "SpecialMesh" then
  499. Msh.MeshType = MeshType
  500. Msh.MeshId = MeshId
  501. end
  502. return Msh
  503. end;
  504. };
  505.  
  506. ["Mesh"] = {
  507. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  508. local Msh = Create(Mesh){
  509. Parent = Part,
  510. Offset = OffSet,
  511. Scale = Scale,
  512. }
  513. if Mesh == "SpecialMesh" then
  514. Msh.MeshType = MeshType
  515. Msh.MeshId = MeshId
  516. end
  517. return Msh
  518. end;
  519. };
  520.  
  521. ["Weld"] = {
  522. Create = function(Parent, Part0, Part1, C0, C1)
  523. local Weld = Create("Weld"){
  524. Parent = Parent,
  525. Part0 = Part0,
  526. Part1 = Part1,
  527. C0 = C0,
  528. C1 = C1,
  529. }
  530. return Weld
  531. end;
  532. };
  533.  
  534. ["Sound"] = {
  535. Create = function(id, par, vol, pit)
  536. coroutine.resume(coroutine.create(function()
  537. local S = Create("Sound"){
  538. Volume = vol,
  539. Pitch = pit or 1,
  540. SoundId = id,
  541. Parent = par or workspace,
  542. }
  543. Instance.new("DistortionSoundEffect", S).Level = 1
  544. wait()
  545. S:play()
  546. game:GetService("Debris"):AddItem(S, 10)
  547. end))
  548. end;
  549. };
  550.  
  551. ["ParticleEmitter"] = {
  552. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  553. local fp = Create("ParticleEmitter"){
  554. Parent = Parent,
  555. Color = ColorSequence.new(Color1, Color2),
  556. LightEmission = LightEmission,
  557. Size = Size,
  558. Texture = Texture,
  559. Transparency = Transparency,
  560. ZOffset = ZOffset,
  561. Acceleration = Accel,
  562. Drag = Drag,
  563. LockedToPart = LockedToPart,
  564. VelocityInheritance = VelocityInheritance,
  565. EmissionDirection = EmissionDirection,
  566. Enabled = Enabled,
  567. Lifetime = LifeTime,
  568. Rate = Rate,
  569. Rotation = Rotation,
  570. RotSpeed = RotSpeed,
  571. Speed = Speed,
  572. VelocitySpread = VelocitySpread,
  573. }
  574. return fp
  575. end;
  576. };
  577. }
  578.  
  579. function rayCast(Position, Direction, Range, Ignore)
  580. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  581. end
  582.  
  583. local function GetNearest(obj, distance)
  584. local last, lastx = distance + 1
  585. for i, v in pairs(workspace:GetChildren()) do
  586. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  587. local t = v.Torso
  588. local dist = (t.Position - obj.Position).magnitude
  589. if dist <= distance then
  590. if dist < last then
  591. last = dist
  592. lastx = v
  593. end
  594. end
  595. end
  596. end
  597. return lastx
  598. end
  599.  
  600. --[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]--
  601.  
  602. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  603. for i, v in pairs(hit:GetChildren()) do
  604. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  605. local find = v:FindFirstChild("DebounceHit")
  606. if not find then
  607. if v.Parent:findFirstChild("Head") then
  608. local BillG = Create("BillboardGui"){
  609. Parent = v.Parent.Head,
  610. Size = UDim2.new(1, 0, 1, 0),
  611. Adornee = v.Parent.Head,
  612. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  613. }
  614. local TL = Create("TextLabel"){
  615. Parent = BillG,
  616. Size = UDim2.new(3, 3, 3, 3),
  617. BackgroundTransparency = 1,
  618. Text = tostring(damage).."-",
  619. TextColor3 = Color1.Color,
  620. TextStrokeColor3 = Color2.Color,
  621. TextStrokeTransparency = 0,
  622. TextXAlignment = Enum.TextXAlignment.Center,
  623. TextYAlignment = Enum.TextYAlignment.Center,
  624. FontSize = Enum.FontSize.Size18,
  625. Font = "ArialBold",
  626. }
  627. coroutine.resume(coroutine.create(function()
  628. swait(1)
  629. for i = 0, 1, .1 do
  630. swait(.1)
  631. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  632. end
  633. BillG:Destroy()
  634. end))
  635. end
  636. v.Health = v.Health - damage
  637. local bool = Create("BoolValue"){
  638. Parent = v,
  639. Name = "DebounceHit",
  640. }
  641. if HSound ~= nil and HPitch ~= nil then
  642. CFuncs["Sound"].Create(HSound, hit, 1, HPitch)
  643. end
  644. game:GetService("Debris"):AddItem(bool, cooldown)
  645. end
  646. end
  647. end
  648. end
  649.  
  650. function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
  651. for _, c in pairs(workspace:children()) do
  652. local hum = c:findFirstChild("Humanoid")
  653. if hum ~= nil then
  654. local head = c:findFirstChild("Torso")
  655. if head ~= nil then
  656. local targ = head.Position - Part.Position
  657. local mag = targ.magnitude
  658. if mag <= magni and c.Name ~= Player.Name then
  659. Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch)
  660. end
  661. end
  662. end
  663. end
  664. end
  665.  
  666. Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Handle", Vector3.new(-0.399999946, 0.899999976, -0.400000095))
  667. HandleWeld = CFuncs["Weld"].Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199958801, -0.0500774384, -1.09998882, -1, 0, 0, 0, 0, -1, -0, -1, -0))
  668. FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
  669. FakeHandleWeld = CFuncs["Weld"].Create(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199996948, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  670. Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095))
  671. BarrelWeld = CFuncs["Weld"].Create(m, FakeHandle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.749999046, -1.50000024, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  672. Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Medium stone grey", "Part", Vector3.new(-0.399999946, 0.299999952, -0.400000095))
  673. PartWeld = CFuncs["Weld"].Create(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.38, -0.300000194, 0.400000160, 1, 0, 0, 0, 1, 0, 0, 0, -1))
  674. CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://443983595", Vector3.new(0, 0, 0), Vector3.new(0.00200000009, 0.00700000007, 0.003000010))
  675. Part.Mesh.TextureId = "rbxassetid://443983604"
  676. Part.Mesh.Scale = Vector3.new(0.017, 0.017, 0.017)
  677.  
  678. EffectModel = Instance.new("Model", Character)
  679. EffectModel.Name = "Effects"
  680.  
  681. Effects = {
  682. ["Block"] = {
  683. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  684. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  685. prt.Anchored = true
  686. prt.CFrame = cframe
  687. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  688. game:GetService("Debris"):AddItem(prt, 10)
  689. if Type == 1 or Type == nil then
  690. table.insert(Effects, {
  691. prt,
  692. "Block1",
  693. delay,
  694. x3,
  695. y3,
  696. z3,
  697. msh
  698. })
  699. elseif Type == 2 then
  700. table.insert(Effects, {
  701. prt,
  702. "Block2",
  703. delay,
  704. x3,
  705. y3,
  706. z3,
  707. msh
  708. })
  709. end
  710. end;
  711. };
  712.  
  713. ["Cylinder"] = {
  714. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  715. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  716. prt.Anchored = true
  717. prt.CFrame = cframe
  718. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  719. game:GetService("Debris"):AddItem(prt, 2)
  720. Effects[#Effects + 1] = {
  721. prt,
  722. "Cylinder",
  723. delay,
  724. x3,
  725. y3,
  726. z3
  727. }
  728. end;
  729. };
  730.  
  731. ["Sphere"] = {
  732. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  733. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  734. prt.Anchored = true
  735. prt.CFrame = cframe
  736. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  737. game:GetService("Debris"):AddItem(prt, 10)
  738. table.insert(Effects, {
  739. prt,
  740. "Cylinder",
  741. delay,
  742. x3,
  743. y3,
  744. z3,
  745. msh
  746. })
  747. end;
  748. };
  749.  
  750. ["Elec"] = {
  751. Create = function(cff, x, y, z)
  752. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  753. prt.Anchored = true
  754. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  755. prt.CFrame = CFrame.new(prt.Position)
  756. game:GetService("Debris"):AddItem(prt, 2)
  757. local xval = math.random() / 2
  758. local yval = math.random() / 2
  759. local zval = math.random() / 2
  760. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  761. table.insert(Effects, {
  762. prt,
  763. "Elec",
  764. 0.1,
  765. x,
  766. y,
  767. z,
  768. xval,
  769. yval,
  770. zval
  771. })
  772. end;
  773.  
  774. };
  775.  
  776. ["Ring"] = {
  777. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  778. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  779. prt.Anchored = true
  780. prt.CFrame = cframe
  781. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  782. game:GetService("Debris"):AddItem(prt, 10)
  783. table.insert(Effects, {
  784. prt,
  785. "Cylinder",
  786. delay,
  787. x3,
  788. y3,
  789. z3,
  790. msh
  791. })
  792. end;
  793. };
  794.  
  795.  
  796. ["Wave"] = {
  797. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  798. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  799. prt.Anchored = true
  800. prt.CFrame = cframe
  801. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  802. game:GetService("Debris"):AddItem(prt, 10)
  803. table.insert(Effects, {
  804. prt,
  805. "Cylinder",
  806. delay,
  807. x3,
  808. y3,
  809. z3,
  810. msh
  811. })
  812. end;
  813. };
  814.  
  815. ["Break"] = {
  816. Create = function(brickcolor, cframe, x1, y1, z1)
  817. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  818. prt.Anchored = true
  819. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  820. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  821. local num = math.random(10, 50) / 1000
  822. game:GetService("Debris"):AddItem(prt, 10)
  823. table.insert(Effects, {
  824. prt,
  825. "Shatter",
  826. num,
  827. prt.CFrame,
  828. math.random() - math.random(),
  829. 0,
  830. math.random(50, 100) / 100
  831. })
  832. end;
  833. };
  834. }
  835.  
  836. Shoot2 = function(orgpos)
  837. local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p)
  838. Effects["Sphere"].Create(BrickColor.new("Really red"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1)
  839. table.insert(Effects, {
  840. MouseLook.lookVector,
  841. "Shoot2",
  842. 50,
  843. orgpos,
  844. 5,
  845. 7,
  846. 0,
  847. 1,
  848. 2
  849. })
  850. end
  851.  
  852. function bulletstorm()
  853. attack = true
  854. CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8)
  855. for i = 0, 1, 0.025 do
  856. swait()
  857. PlayAnimationFromTable({
  858. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  859. CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  860. CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  861. CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  862. CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  863. CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  864. }, .3, false)
  865. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  866. Shoot2(Barrel.Position)
  867. end
  868.  
  869. attack = false
  870. end
  871.  
  872. function overload()
  873. attack = true
  874. CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8)
  875. Shoot2(LeftArm.Position)
  876. Shoot2(RightArm.Position)
  877. Shoot2(RightLeg.Position)
  878. Shoot2(LeftLeg.Position)
  879. Shoot2(Head.Position)
  880. Shoot2(Torso.Position)
  881. wait(0)
  882. attack = false
  883. end
  884.  
  885. function overcharge()
  886. attack = true
  887. CFuncs["Sound"].Create("rbxassetid://813670691", Torso, .1, 2.8)
  888. for i = 0, 1, 0.15 do
  889. swait()
  890. PlayAnimationFromTable({
  891. CFrame.new(-0.0325974114, -4.05311584e-006, 0.110728048, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  892. CFrame.new(0, 1.50000095, 0, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  893. CFrame.new(1.10100186, 0.535800219, -0.637803555, 0.658456147, 0.673041463, 0.336824596, 0.280167073, 0.196174845, -0.939692438, -0.698528469, 0.713113427, -0.0593915135),
  894. CFrame.new(-1.62758517, 0.073027119, -0.378663093, 0.90510416, 0.321394593, -0.278374165, -0.392632991, 0.883023262, -0.25711751, 0.163174719, 0.342016995, 0.92541796),
  895. CFrame.new(0.644929826, -1.96549833, 0.164695352, 0.962249994, -0.148305506, 0.228211343, 0.0871559754, 0.962249756, 0.257835865, -0.257834762, -0.22821258, 0.938850582),
  896. CFrame.new(-0.750219464, -1.99537396, -0.240616962, 0.862504363, 0.0818999186, 0.499378443, -0.08583197, 0.99619472, -0.0151344473, -0.498717606, -0.0298091136, 0.866251826),
  897. }, .5, false)
  898. end
  899. wait(3)
  900. Shoot2(Barrel.Position)
  901. Shoot2(Barrel.Position)
  902. Shoot2(Handle.Position)
  903. Shoot2(Handle.Position)
  904. Shoot2(FakeHandle.Position)
  905. Shoot2(FakeHandle.Position)
  906. Shoot2(Barrel.Position)
  907. Shoot2(Barrel.Position)
  908. Shoot2(Handle.Position)
  909. Shoot2(Handle.Position)
  910. Shoot2(FakeHandle.Position)
  911. Shoot2(FakeHandle.Position)
  912. Shoot2(Barrel.Position)
  913. Shoot2(Barrel.Position)
  914. Shoot2(Handle.Position)
  915. Shoot2(Handle.Position)
  916. Shoot2(FakeHandle.Position)
  917. Shoot2(FakeHandle.Position)
  918. Shoot2(Barrel.Position)
  919. Shoot2(Barrel.Position)
  920. Shoot2(Handle.Position)
  921. Shoot2(Handle.Position)
  922. Shoot2(FakeHandle.Position)
  923. Shoot2(FakeHandle.Position)
  924. for i = 0, 1, 0.15 do
  925. swait()
  926. PlayAnimationFromTable({
  927. CFrame.new(2.70828605e-006, -0.256154776, -0.071654655, 0.499999046, -1.78813579e-007, -0.866026044, 0.150384009, 0.984807789, 0.0868238211, 0.852869093, -0.173648283, 0.492402941),
  928. CFrame.new(4.34633694e-006, 1.49999607, 2.42484384e-006, 0.646143615, 0.0549410731, 0.761235893, -0.0851004422, 0.996372402, 0.000322267413, -0.758456767, -0.0649897307, 0.648474991),
  929. CFrame.new(1.86507177, 0.598104239, 0.183552518, -0.114682339, -0.981059372, -0.156110525, 0.981060445, -0.0871559381, -0.172987223, 0.156104773, -0.172992408, 0.9724738),
  930. CFrame.new(-1.52644157, 0.0874626189, -0.302744657, 0.95125103, 0.20658794, -0.229004204, -0.254887104, 0.944645047, -0.2065873, 0.173649222, 0.254886597, 0.951251268),
  931. CFrame.new(0.623469114, -1.90178788, 0.0298061967, 0.992532074, -0.0928985924, 0.079056859, 0.0757590532, 0.97739321, 0.197391063, -0.0956070125, -0.189927697, 0.977131963),
  932. CFrame.new(-0.786503196, -1.67652178, -0.389780819, 0.631277382, 0.179900557, 0.754403591, -0.0723632798, 0.982144117, -0.173656344, -0.772174001, 0.0550341941, 0.6330235),
  933. }, .35, false)
  934. end
  935. attack = false
  936. end
  937.  
  938. function attackone()
  939. attack = true
  940. CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8)
  941. for i = 0, 1, 0.025 do
  942. swait()
  943. PlayAnimationFromTable({
  944. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  945. CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  946. CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  947. CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  948. CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  949. CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  950. }, .3, false)
  951. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  952. end
  953. CFuncs["Sound"].Create("rbxassetid://203691837", Barrel, .01, .3)
  954. CFuncs["Sound"].Create("rbxassetid://203691885", Barrel, .01, .9)
  955. CFuncs["Sound"].Create("rbxassetid://184718741", Barrel, .05, .9)
  956. Shoot2(Barrel.Position)
  957. for i = 0, 1, 0.15 do
  958. swait()
  959. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  960. PlayAnimationFromTable({
  961. CFrame.new(-0, -0.281125277, 0.157014638, 1, 0, -0, 0, 0.906307876, -0.422617942, 0, 0.422617942, 0.906307876) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  962. CFrame.new(0, 1.4999938, 1.05202198e-005, 1, 0, -0, 0, 0.965925813, 0.258818924, -0, -0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  963. CFrame.new(0.406597674, 0.817824185, -0.957423151, 0.939692974, 0.280165672, -0.196174338, -5.36441803e-007, -0.573575616, -0.819152534, -0.34201926, 0.769751906, -0.538984895) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  964. CFrame.new(-0.506752789, 0.775180221, -0.974653006, 0.939692974, -0.280165732, 0.196174279, 5.36441803e-007, -0.573575556, -0.819152713, 0.34201926, 0.769752145, -0.538984716) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  965. CFrame.new(0.566868722, -1.61683154, -0.13679418, 0.954536259, -0.174988821, -0.241328761, 0.172366679, 0.984509468, -0.0321052969, 0.243208498, -0.0109513998, 0.969912171) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  966. CFrame.new(-0.545306504, -1.37044179, -0.679420352, 0.996202111, 0.0754783303, 0.0434113704, -0.0434117466, 0.862729907, -0.503797948, -0.0754781216, 0.49999994, 0.862729967) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  967. }, .6, false)
  968. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3)
  969. end
  970. for i = 0, 1, 0.15 do
  971. swait()
  972. RootPart.Velocity = RootPart.CFrame.lookVector * -100
  973. PlayAnimationFromTable({
  974. CFrame.new(-0, -0.795007467, 0.0831707418, 1, 0, -0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  975. CFrame.new(0, 1.49999774, 1.20103359e-005, 1, 0, -0, 0, 0.965925634, 0.258819878, -0, -0.258819878, 0.965925634) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  976. CFrame.new(1.70605683, 1.21151328, -0.185158521, 0.893217862, -0.29338178, -0.340718448, -0.340719074, -0.936116338, -0.0871595442, -0.293381065, 0.193941653, -0.936116695) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  977. CFrame.new(-1.69524968, 1.05172348, -0.252849877, 0.812758088, 0.493294626, 0.309975445, 0.582562625, -0.694268882, -0.422624737, 0.00672781467, 0.524071693, -0.851647615) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  978. CFrame.new(0.689150453, -1.88461804, -0.0157705098, 0.954536736, -0.174989104, -0.241326213, 0.172367141, 0.984509468, -0.0321044922, 0.243205875, -0.0109517872, 0.969912887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  979. CFrame.new(-0.536899447, -1.34506011, -0.583059072, 0.99620223, 0.0226762109, 0.0840658173, -0.043412663, 0.966281295, 0.253803402, -0.0754759163, -0.256489068, 0.963595748) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  980. }, .2, false)
  981. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3)
  982. end
  983. for i = 0, 1, 0.05 do
  984. swait()
  985. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  986. PlayAnimationFromTable({
  987. CFrame.new(-0, -2.09708667, 0.108620644, 1, 0, -0, 0, 0.573575675, -0.819152594, 0, 0.819152594, 0.573575675) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  988. CFrame.new(0, 1.53697455, -0.422635257, 1, 0, -0, 0, 0.766043842, 0.64278841, -0, -0.64278841, 0.766043842) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  989. CFrame.new(1.57810855, 0.650130272, 0.33058399, 0.930655897, -0.284022599, -0.230674848, 0.352510452, 0.527023435, 0.773293555, -0.0980618149, -0.800985396, 0.590598404) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  990. CFrame.new(-1.38994181, 0.87733829, 0.667137444, 0.963715255, 0.08906921, 0.251633942, -0.25866431, 0.0788001418, 0.962747812, 0.0659223944, -0.992903471, 0.0989798903) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  991. CFrame.new(0.774198592, -1.52057803, -0.607582211, 0.954536974, -0.272207022, -0.121501081, 0.172365844, 0.83655864, -0.520057499, 0.243206039, 0.475471497, 0.845445395) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  992. CFrame.new(-0.530096769, -1.05517173, -0.660005629, 0.99620223, 0.0226761587, 0.0840661526, -0.0434127897, 0.966280818, 0.253804684, -0.0754762068, -0.256490231, 0.96359539) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  993. }, .3, false)
  994. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3)
  995. end
  996. for i = 0, 1, 0.13 do
  997. swait()
  998. PlayAnimationFromTable({
  999. CFrame.new(-0, -1.01349139, -0.251608461, 1, 0, 0, 0, 0.707105339, 0.707108378, 0, -0.707108378, 0.707105339) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1000. CFrame.new(0.0127754211, 1.44207788, 0.0749337673, 1, 0, 0, 0, 0.939691544, -0.342023343, 0, 0.342023343, 0.939691544) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1001. CFrame.new(1.62296665, 0.191783041, -0.192457974, 0.930656254, -0.329096794, 0.159920022, 0.352511466, 0.923570275, -0.150843769, -0.098055169, 0.196757287, 0.975536823) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1002. CFrame.new(-0.870643735, 0.71258086, -0.942903101, 0.18127799, -0.372358024, -0.910213113, -0.781424284, 0.507405519, -0.363202393, 0.597088516, 0.777103186, -0.19898814) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1003. CFrame.new(0.214147568, -1.73508716, -0.0895051956, 0.924306214, 0.282332808, -0.256800473, -0.113861978, 0.846218646, 0.520528436, 0.364271581, -0.451887846, 0.814311981) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1004. CFrame.new(-0.535767198, -0.599929333, -0.996632636, 0.996202111, 0.0754788443, 0.0434101112, -0.0434126705, 0.862728953, -0.503799856, -0.0754773915, 0.500001788, 0.862729192) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1005. }, .3, false)
  1006. end
  1007. attack = false
  1008. end
  1009.  
  1010. --[[Attacks]]--
  1011.  
  1012. mouse.Button1Down:connect(function()
  1013. if attack == false and attacktype == 1 then
  1014. attackone()
  1015. end
  1016. end)
  1017.  
  1018. mouse.KeyDown:connect(function(k)
  1019. k = k:lower()
  1020. if attack == false and k == 'q' then
  1021. bulletstorm()
  1022. elseif attack == false and k == 'e' then
  1023. overload()
  1024. elseif attack == false and k == 'r' then
  1025. overcharge()
  1026. end
  1027. end)
  1028.  
  1029. while true do
  1030. swait()
  1031. for i, v in pairs(Character:GetChildren()) do
  1032. if v:IsA("Part") then
  1033. v.Material = "SmoothPlastic"
  1034. elseif v:IsA("Accessory") then
  1035. v:WaitForChild("Handle").Material = "SmoothPlastic"
  1036. end
  1037. end
  1038. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1039. velocity = RootPart.Velocity.y
  1040. sine = sine + change
  1041. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1042. if equipped == true or equipped == false then
  1043. if RootPart.Velocity.y > 1 and hit == nil then
  1044. Anim = "Jump"
  1045. if attack == false then
  1046. PlayAnimationFromTable({
  1047. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1048. CFrame.new(0, 1.49221826, -0.044082582, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1049. CFrame.new(1.66304386, 0.182627335, 0.00782334805, 0.883022726, -0.392632574, 0.257119894, 0.321392894, 0.905103981, 0.2783764, -0.342019886, -0.163176134, 0.925416708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1050. CFrame.new(-1.66570556, 0.224230319, 0.110721856, 0.903736115, 0.408218145, -0.128915116, -0.34750703, 0.875426054, 0.33595863, 0.25000003, -0.258819014, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1051. CFrame.new(0.499999166, -1.99999452, 4.76837158e-007, 0.984807849, -5.94328526e-007, -0.173648044, 0.0449439958, 0.965925872, 0.254886925, 0.167730987, -0.258819073, 0.951251388) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1052. CFrame.new(-0.499999404, -1.51703107, -0.129407585, 0.965925753, 6.6929374e-007, 0.258819193, -0.0669879839, 0.965925813, 0.24999994, -0.24999994, -0.258819163, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1053. }, .3, false)
  1054. end
  1055. elseif RootPart.Velocity.y < -60 and hit == nil then
  1056. Anim = "Fall"
  1057. if attack == false then
  1058. PlayAnimationFromTable({
  1059. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1060. CFrame.new(0, 1.49221873, -0.0440826714, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1061. CFrame.new(1.76076102, 0.406842887, 0.0212866664, 0.695482016, -0.670965135, 0.257119834, 0.611573994, 0.74059701, 0.278376371, -0.377202988, -0.0363579579, 0.925416648) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1062. CFrame.new(-1.68029141, 0.390803367, 0.155905366, 0.70961535, 0.692695498, -0.128914997, -0.625963271, 0.703777075, 0.335958213, 0.323444158, -0.157705069, 0.933012843) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1063. CFrame.new(0.693307817, -1.96826017, -0.0605875254, 0.986561239, -0.127662987, -0.101976946, 0.137943029, 0.985269904, 0.101069227, 0.0875720233, -0.113777988, 0.989639223) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1064. CFrame.new(-0.526552737, -1.81498528, -0.152177691, 0.965925574, 0.0449441113, 0.254888207, -0.066988036, 0.994663239, 0.0784704387, -0.250001162, -0.0928710476, 0.963781357) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1065. }, .3, false)
  1066. end
  1067. elseif Torsovelocity < 1 and hit ~= nil then
  1068. Anim = "Idle"
  1069. if attack == false then
  1070. change = 1
  1071. PlayAnimationFromTable({
  1072. CFrame.new(1.22602091e-006, -0.219458103, 1.46111324e-006, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1073. CFrame.new(0, 1.49999201, 0, 0.707106233, 0, -0.707107306, 0, 1, 0, 0.707107306, 0, 0.707106233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1074. CFrame.new(0.571566343, -0.0739164352, -0.639066696, 0.939692855, 0.340718329, -0.0298085809, -0.241844058, 0.600305915, -0.762328327, -0.241844922, 0.723563433, 0.646503866) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1075. CFrame.new(-0.628383756, -0.12163578, -0.696761668, 0.939692736, -0.342020065, -5.06639481e-007, 0.196173996, 0.538984895, -0.819152653, 0.280166954, 0.769751549, 0.573575616) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1076. CFrame.new(0.624118924, -1.79798961, 0.0678238794, 0.995454907, -0.0383867361, -0.0871553123, 0.0385330059, 0.999257326, -4.09960694e-006, 0.0870907605, -0.00335427374, 0.996194839) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1077. CFrame.new(-0.53866595, -1.82180798, 0.00821807235, 0.977763176, 0.0281341001, 0.207816422, -0.0287620034, 0.999586344, -1.4934686e-007, -0.207730502, -0.00597707182, 0.978167892) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1078. }, .3, false)
  1079. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  1080. end
  1081. elseif Torsovelocity > 2 and hit ~= nil then
  1082. Anim = "Walk"
  1083. if attack == false then
  1084. change = 3
  1085. PlayAnimationFromTable({
  1086. CFrame.new(0, -0.0240751095, -0.146390602, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1087. CFrame.new(0, 1.49999237, -1.81794167e-006, 1, 0, 0, 0, 0.984807789, -0.173647881, 0, 0.173647881, 0.984807789) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1088. CFrame.new(0.172261134, 0.427689523, -1.09730911, 0.644483984, 0.748984814, -0.153825179, 0.413525045, -0.510645986, -0.753815472, -0.643146515, 0.422211438, -0.638827145) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1089. CFrame.new(-1.1922102, 0.363029838, -0.448653877, 0.935289383, -0.110854559, -0.33607316, -0.341521561, -0.531564534, -0.775114357, -0.0927196145, 0.839732468, -0.535025835) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1090. CFrame.new(.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  1091. CFrame.new(-.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  1092. }, .3, false)
  1093. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
  1094. end
  1095. end
  1096. end
  1097. if 0 < #Effects then
  1098. for e = 1, #Effects do
  1099. if Effects[e] ~= nil then
  1100. local Thing = Effects[e]
  1101. if Thing ~= nil then
  1102. local Part = Thing[1]
  1103. local Mode = Thing[2]
  1104. local Delay = Thing[3]
  1105. local IncX = Thing[4]
  1106. local IncY = Thing[5]
  1107. local IncZ = Thing[6]
  1108. if Thing[2] == "Shoot" then
  1109. local Look = Thing[1]
  1110. local hit, pos = rayCast(Thing[4], Look, 15, Character)
  1111. local mag = (Thing[4] - pos).magnitude
  1112. Thing[9] = Thing[9] + 0.5
  1113. Thing[5] = Thing[5] + 0.2
  1114. Thing[6] = Thing[6] + 0.2
  1115. Effects["Cylinder"].Create(BrickColor.new("Really red"), CFrame.new((Thing[4] + pos) / 2, pos) * angles(1.57, 0, 0), Thing[9], mag * 5, Thing[9], -0.2, 0, -0.2, 0.1)
  1116. Thing[4] = Thing[4] + Look * 15
  1117. Thing[3] = Thing[3] - 1
  1118. if hit ~= nil then
  1119. Thing[3] = 0
  1120. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1121. ref.Anchored = true
  1122. ref.CFrame = CFrame.new(pos)
  1123. Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1124. CFuncs["Sound"].Create("rbxassetid://315748949", ref, 1, 1.1)
  1125. game:GetService("Debris"):AddItem(ref, 1)
  1126. end
  1127. if Thing[3] <= 0 then
  1128. table.remove(Effects, e)
  1129. end
  1130. end
  1131. do
  1132. if Thing[2] == "Shoot2" then
  1133. local Look = Thing[1]
  1134. local hit, pos = rayCast(Thing[4], Look, 3, Character)
  1135. local mag = (Thing[4] - pos).magnitude
  1136. Thing[9] = Thing[9] + 0.5
  1137. Thing[5] = Thing[5] + 0.2
  1138. Thing[6] = Thing[6] + 0.2
  1139. Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2)
  1140. Thing[4] = Thing[4] + Look * 3
  1141. Thing[3] = Thing[3] + 5
  1142. if hit ~= nil then
  1143. Thing[3] = 0
  1144. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1145. ref.Anchored = true
  1146. ref.CFrame = CFrame.new(pos)
  1147. Effects["Sphere"].Create(BrickColor.new("Really red"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01)
  1148. Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01)
  1149. Effects["Block"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1)
  1150. Effects["Wave"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01)
  1151. CFuncs["Sound"].Create("rbxassetid://203691837", ref, 1, .3)
  1152. CFuncs["Sound"].Create("rbxassetid://203691885", ref, 1, .9)
  1153. CFuncs["Sound"].Create("rbxassetid://184718741", ref, 1, .9)
  1154. local e = Instance.new("Explosion", ref)
  1155. e.Position = ref.Position
  1156. e.BlastRadius = 400
  1157. e.DestroyJointRadiusPercent = 20
  1158. e.Visible = false
  1159. e.ExplosionType = "CratersAndDebris"
  1160. game:GetService("Debris"):AddItem(ref, 10)
  1161. end
  1162. if Thing[3] <= 0 then
  1163. table.remove(Effects, e)
  1164. end
  1165. end
  1166. do
  1167. do
  1168. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then
  1169. if Thing[1].Transparency <= 1 then
  1170. if Thing[2] == "Block1" then
  1171. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1172. Mesh = Thing[7]
  1173. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1174. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1175. else
  1176. if Thing[2] == "Block2" then
  1177. Thing[1].CFrame = Thing[1].CFrame
  1178. Mesh = Thing[7]
  1179. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1180. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1181. else
  1182. if Thing[2] == "Block3" then
  1183. Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9]
  1184. Mesh = Thing[7]
  1185. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1186. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1187. else
  1188. if Thing[2] == "Cylinder" then
  1189. Mesh = Thing[7]
  1190. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1191. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1192. else
  1193. if Thing[2] == "Cylinder2" then
  1194. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0)
  1195. Mesh = Thing[7]
  1196. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1197. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1198. else
  1199. if Thing[2] == "Blood" then
  1200. Mesh = Thing[7]
  1201. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1202. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1203. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1204. else
  1205. if Thing[2] == "Elec" then
  1206. Mesh = Thing[10]
  1207. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1208. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1209. else
  1210. if Thing[2] == "Disappear" then
  1211. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1212. end
  1213. end
  1214. end
  1215. end
  1216. end
  1217. end
  1218. end
  1219. end
  1220. else
  1221. Part.Parent = nil
  1222. table.remove(Effects, e)
  1223. end
  1224. end
  1225. end
  1226. end
  1227. end
  1228. end
  1229. end
  1230. end
  1231. end
  1232. endF
Add Comment
Please, Sign In to add comment