Advertisement
reset234567890

Untitled

May 26th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.68 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  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.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. CV="Black"
  149.  
  150. p = game.Players.LocalPlayer
  151. char = p.Character
  152. local txt = Instance.new("BillboardGui", char)
  153. txt.Adornee = char .Head
  154. txt.Name = "_status"
  155. txt.Size = UDim2.new(2, 0, 1.2, 0)
  156. txt.StudsOffset = Vector3.new(-9, 8, 0)
  157. local text = Instance.new("TextLabel", txt)
  158. text.Size = UDim2.new(10, 0, 7, 0)
  159. text.FontSize = "Size24"
  160. text.TextScaled = true
  161. text.TextTransparency = 0
  162. text.BackgroundTransparency = 1
  163. text.TextTransparency = 0
  164. text.TextStrokeTransparency = 1
  165. text.Font = "Arcade"
  166. text.TextStrokeColor3 = Color3.new(255,255,0)
  167.  
  168. v=Instance.new("Part")
  169. v.Name = "ColorBrick"
  170. v.Parent=p.Character
  171. v.FormFactor="Symmetric"
  172. v.Anchored=true
  173. v.CanCollide=false
  174. v.BottomSurface="Smooth"
  175. v.TopSurface="Smooth"
  176. v.Size=Vector3.new(10,50,3)
  177. v.Transparency=1
  178. v.CFrame=char.Torso.CFrame
  179. v.BrickColor=BrickColor.new(CV)
  180. v.Transparency=1
  181. text.TextColor3 = Color3.new(0,255,255)
  182. v.Shape="Block"
  183. text.Text = "SOME IDIOT WITH A SHOTGUN"
  184. wait(1 / 60)
  185. Effects = { }
  186. local Player = game.Players.localPlayer
  187. local Character = Player.Character
  188. local Humanoid = Character.Humanoid
  189. local mouse = Player:GetMouse()
  190. local m = Instance.new('Model', Character)
  191. m.Name = "WeaponModel"
  192. local LeftArm = Character["Left Arm"]
  193. local RightArm = Character["Right Arm"]
  194. local LeftLeg = Character["Left Leg"]
  195. local RightLeg = Character["Right Leg"]
  196. local Head = Character.Head
  197. local Torso = Character.Torso
  198. local cam = game.Workspace.CurrentCamera
  199. local RootPart = Character.HumanoidRootPart
  200. local RootJoint = RootPart.RootJoint
  201. local equipped = false
  202. local attack = false
  203. local Anim = 'Idle'
  204. local idle = 0
  205. local attacktype = 1
  206. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  207. local velocity = RootPart.Velocity.y
  208. local sine = 0
  209. local change = 1
  210. local grabbed = false
  211. local cn = CFrame.new
  212. local mr = math.rad
  213. local angles = CFrame.Angles
  214. local ud = UDim2.new
  215. local c3 = Color3.new
  216. Instance.new("ForceField", game.Players.LocalPlayer.Character)
  217. local s = Instance.new("Sound",Character)
  218. s.Name = "BGMusic"
  219. s.SoundId = "rbxassetid://257575717"
  220. s.Pitch = 1
  221. s.Volume = 0.25
  222. s.Looped = true
  223. s.archivable = false
  224. wait(0.1)
  225. s:play()
  226.  
  227. Humanoid.Animator.Parent = nil
  228. Character.Animate.Parent = nil
  229.  
  230. local newMotor = function(part0, part1, c0, c1)
  231. local w = Instance.new('Motor', part0)
  232. w.Part0 = part0
  233. w.Part1 = part1
  234. w.C0 = c0
  235. w.C1 = c1
  236. return w
  237. end
  238.  
  239. function clerp(a, b, t)
  240. return a:lerp(b, t)
  241. end
  242.  
  243. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  244. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  245.  
  246. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  247. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  248. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  249. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  250. RootJoint.C1 = CFrame.new(0, 0, 0)
  251. RootJoint.C0 = CFrame.new(0, 0, 0)
  252. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  253. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  254.  
  255. local rarmc1 = RW.C1
  256. local larmc1 = LW.C1
  257. local rlegc1 = RH.C1
  258. local llegc1 = LH.C1
  259.  
  260. local resetc1 = false
  261.  
  262. function PlayAnimationFromTable(table, speed, bool)
  263. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  264. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  265. RW.C0 = clerp(RW.C0, table[3], speed)
  266. LW.C0 = clerp(LW.C0, table[4], speed)
  267. RH.C0 = clerp(RH.C0, table[5], speed)
  268. LH.C0 = clerp(LH.C0, table[6], speed)
  269. if bool == true then
  270. if resetc1 == false then
  271. resetc1 = true
  272. RootJoint.C1 = RootJoint.C1
  273. Torso.Neck.C1 = Torso.Neck.C1
  274. RW.C1 = rarmc1
  275. LW.C1 = larmc1
  276. RH.C1 = rlegc1
  277. LH.C1 = llegc1
  278. end
  279. end
  280. end
  281.  
  282. Char = char
  283.  
  284. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  285.  
  286. ArtificialHB = Instance.new("BindableEvent", script)
  287. ArtificialHB.Name = "Heartbeat"
  288.  
  289. script:WaitForChild("Heartbeat")
  290.  
  291. frame = 1 / 30
  292. tf = 0
  293. allowframeloss = false
  294. tossremainder = false
  295. lastframe = tick()
  296. script.Heartbeat:Fire()
  297.  
  298. game:GetService("RunService").Heartbeat:connect(function(s, p)
  299. tf = tf + s
  300. if tf >= frame then
  301. if allowframeloss then
  302. script.Heartbeat:Fire()
  303. lastframe = tick()
  304. else
  305. for i = 1, math.floor(tf / frame) do
  306. script.Heartbeat:Fire()
  307. end
  308. lastframe = tick()
  309. end
  310. if tossremainder then
  311. tf = 0
  312. else
  313. tf = tf - frame * math.floor(tf / frame)
  314. end
  315. end
  316. end)
  317.  
  318. function swait(num)
  319. if num == 0 or num == nil then
  320. ArtificialHB.Event:wait()
  321. else
  322. for i = 0, num do
  323. ArtificialHB.Event:wait()
  324. end
  325. end
  326. end
  327.  
  328. local RbxUtility = LoadLibrary("RbxUtility")
  329. local Create = RbxUtility.Create
  330.  
  331. function RemoveOutlines(part)
  332. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  333. end
  334.  
  335. CFuncs = {
  336. ["Part"] = {
  337. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  338. local Part = Create("Part"){
  339. Parent = Parent,
  340. Reflectance = Reflectance,
  341. Transparency = Transparency,
  342. CanCollide = false,
  343. Locked = true,
  344. BrickColor = BrickColor.new(tostring(BColor)),
  345. Name = Name,
  346. Size = Size,
  347. Material = Material,
  348. }
  349. RemoveOutlines(Part)
  350. return Part
  351. end;
  352. };
  353.  
  354. ["Mesh"] = {
  355. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  356. local Msh = Create(Mesh){
  357. Parent = Part,
  358. Offset = OffSet,
  359. Scale = Scale,
  360. }
  361. if Mesh == "SpecialMesh" then
  362. Msh.MeshType = MeshType
  363. Msh.MeshId = MeshId
  364. end
  365. return Msh
  366. end;
  367. };
  368.  
  369. ["Mesh"] = {
  370. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  371. local Msh = Create(Mesh){
  372. Parent = Part,
  373. Offset = OffSet,
  374. Scale = Scale,
  375. }
  376. if Mesh == "SpecialMesh" then
  377. Msh.MeshType = MeshType
  378. Msh.MeshId = MeshId
  379. end
  380. return Msh
  381. end;
  382. };
  383.  
  384. ["Weld"] = {
  385. Create = function(Parent, Part0, Part1, C0, C1)
  386. local Weld = Create("Weld"){
  387. Parent = Parent,
  388. Part0 = Part0,
  389. Part1 = Part1,
  390. C0 = C0,
  391. C1 = C1,
  392. }
  393. return Weld
  394. end;
  395. };
  396.  
  397. ["Sound"] = {
  398. Create = function(id, par, vol, pit)
  399. coroutine.resume(coroutine.create(function()
  400. local S = Create("Sound"){
  401. Volume = vol,
  402. Pitch = pit or 1,
  403. SoundId = id,
  404. Parent = par or workspace,
  405. }
  406. Instance.new("DistortionSoundEffect", S).Level = 1
  407. wait()
  408. S:play()
  409. game:GetService("Debris"):AddItem(S, 10)
  410. end))
  411. end;
  412. };
  413.  
  414. ["ParticleEmitter"] = {
  415. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  416. local fp = Create("ParticleEmitter"){
  417. Parent = Parent,
  418. Color = ColorSequence.new(Color1, Color2),
  419. LightEmission = LightEmission,
  420. Size = Size,
  421. Texture = Texture,
  422. Transparency = Transparency,
  423. ZOffset = ZOffset,
  424. Acceleration = Accel,
  425. Drag = Drag,
  426. LockedToPart = LockedToPart,
  427. VelocityInheritance = VelocityInheritance,
  428. EmissionDirection = EmissionDirection,
  429. Enabled = Enabled,
  430. Lifetime = LifeTime,
  431. Rate = Rate,
  432. Rotation = Rotation,
  433. RotSpeed = RotSpeed,
  434. Speed = Speed,
  435. VelocitySpread = VelocitySpread,
  436. }
  437. return fp
  438. end;
  439. };
  440. }
  441.  
  442. function rayCast(Position, Direction, Range, Ignore)
  443. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  444. end
  445.  
  446. local function GetNearest(obj, distance)
  447. local last, lastx = distance + 1
  448. for i, v in pairs(workspace:GetChildren()) do
  449. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  450. local t = v.Torso
  451. local dist = (t.Position - obj.Position).magnitude
  452. if dist <= distance then
  453. if dist < last then
  454. last = dist
  455. lastx = v
  456. end
  457. end
  458. end
  459. end
  460. return lastx
  461. end
  462.  
  463. --[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]--
  464.  
  465. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  466. for i, v in pairs(hit:GetChildren()) do
  467. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  468. local find = v:FindFirstChild("DebounceHit")
  469. if not find then
  470. if v.Parent:findFirstChild("Head") then
  471. local BillG = Create("BillboardGui"){
  472. Parent = v.Parent.Head,
  473. Size = UDim2.new(1, 0, 1, 0),
  474. Adornee = v.Parent.Head,
  475. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  476. }
  477. local TL = Create("TextLabel"){
  478. Parent = BillG,
  479. Size = UDim2.new(3, 3, 3, 3),
  480. BackgroundTransparency = 1,
  481. Text = tostring(damage).."-",
  482. TextColor3 = Color1.Color,
  483. TextStrokeColor3 = Color2.Color,
  484. TextStrokeTransparency = 0,
  485. TextXAlignment = Enum.TextXAlignment.Center,
  486. TextYAlignment = Enum.TextYAlignment.Center,
  487. FontSize = Enum.FontSize.Size18,
  488. Font = "ArialBold",
  489. }
  490. coroutine.resume(coroutine.create(function()
  491. swait(1)
  492. for i = 0, 1, .1 do
  493. swait(.1)
  494. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  495. end
  496. BillG:Destroy()
  497. end))
  498. end
  499. v.Health = v.Health - damage
  500. local bool = Create("BoolValue"){
  501. Parent = v,
  502. Name = "DebounceHit",
  503. }
  504. if HSound ~= nil and HPitch ~= nil then
  505. CFuncs["Sound"].Create(HSound, hit, 1, HPitch)
  506. end
  507. game:GetService("Debris"):AddItem(bool, cooldown)
  508. end
  509. end
  510. end
  511. end
  512.  
  513. function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
  514. for _, c in pairs(workspace:children()) do
  515. local hum = c:findFirstChild("Humanoid")
  516. if hum ~= nil then
  517. local head = c:findFirstChild("Torso")
  518. if head ~= nil then
  519. local targ = head.Position - Part.Position
  520. local mag = targ.magnitude
  521. if mag <= magni and c.Name ~= Player.Name then
  522. Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch)
  523. end
  524. end
  525. end
  526. end
  527. end
  528.  
  529. Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really red", "Handle", Vector3.new(-0.399999946, 0.899999976, -0.400000095))
  530. 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))
  531. FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really red", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
  532. 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))
  533. Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really red", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095))
  534. 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))
  535. Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Really red", "Part", Vector3.new(-0.399999946, 0.299999952, -0.400000095))
  536. 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))
  537. CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://94219391", Vector3.new(0, 0, 0), Vector3.new(0.00200000009, 0.00700000007, 0.003000010))
  538. Part.Mesh.TextureId = "rbxassetid://94219470"
  539. Part.Mesh.Scale = Vector3.new(-1.05, 1.05, 1.05)
  540.  
  541. EffectModel = Instance.new("Model", Character)
  542. EffectModel.Name = "Effects"
  543.  
  544. Effects = {
  545. ["Block"] = {
  546. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  547. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  548. prt.Anchored = true
  549. prt.CFrame = cframe
  550. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  551. game:GetService("Debris"):AddItem(prt, 10)
  552. if Type == 1 or Type == nil then
  553. table.insert(Effects, {
  554. prt,
  555. "Block1",
  556. delay,
  557. x3,
  558. y3,
  559. z3,
  560. msh
  561. })
  562. elseif Type == 2 then
  563. table.insert(Effects, {
  564. prt,
  565. "Block2",
  566. delay,
  567. x3,
  568. y3,
  569. z3,
  570. msh
  571. })
  572. end
  573. end;
  574. };
  575.  
  576. ["Cylinder"] = {
  577. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  578. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  579. prt.Anchored = true
  580. prt.CFrame = cframe
  581. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  582. game:GetService("Debris"):AddItem(prt, 2)
  583. Effects[#Effects + 1] = {
  584. prt,
  585. "Cylinder",
  586. delay,
  587. x3,
  588. y3,
  589. z3
  590. }
  591. end;
  592. };
  593.  
  594. ["Sphere"] = {
  595. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  596. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  597. prt.Anchored = true
  598. prt.CFrame = cframe
  599. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  600. game:GetService("Debris"):AddItem(prt, 10)
  601. table.insert(Effects, {
  602. prt,
  603. "Cylinder",
  604. delay,
  605. x3,
  606. y3,
  607. z3,
  608. msh
  609. })
  610. end;
  611. };
  612.  
  613. ["Elec"] = {
  614. Create = function(cff, x, y, z)
  615. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  616. prt.Anchored = true
  617. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  618. prt.CFrame = CFrame.new(prt.Position)
  619. game:GetService("Debris"):AddItem(prt, 2)
  620. local xval = math.random() / 2
  621. local yval = math.random() / 2
  622. local zval = math.random() / 2
  623. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  624. table.insert(Effects, {
  625. prt,
  626. "Elec",
  627. 0.1,
  628. x,
  629. y,
  630. z,
  631. xval,
  632. yval,
  633. zval
  634. })
  635. end;
  636.  
  637. };
  638.  
  639. ["Ring"] = {
  640. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  641. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  642. prt.Anchored = true
  643. prt.CFrame = cframe
  644. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  645. game:GetService("Debris"):AddItem(prt, 10)
  646. table.insert(Effects, {
  647. prt,
  648. "Cylinder",
  649. delay,
  650. x3,
  651. y3,
  652. z3,
  653. msh
  654. })
  655. end;
  656. };
  657.  
  658.  
  659. ["Wave"] = {
  660. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  661. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  662. prt.Anchored = true
  663. prt.CFrame = cframe
  664. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  665. game:GetService("Debris"):AddItem(prt, 10)
  666. table.insert(Effects, {
  667. prt,
  668. "Cylinder",
  669. delay,
  670. x3,
  671. y3,
  672. z3,
  673. msh
  674. })
  675. end;
  676. };
  677.  
  678. ["Break"] = {
  679. Create = function(brickcolor, cframe, x1, y1, z1)
  680. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  681. prt.Anchored = true
  682. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  683. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  684. local num = math.random(10, 50) / 1000
  685. game:GetService("Debris"):AddItem(prt, 10)
  686. table.insert(Effects, {
  687. prt,
  688. "Shatter",
  689. num,
  690. prt.CFrame,
  691. math.random() - math.random(),
  692. 0,
  693. math.random(50, 100) / 100
  694. })
  695. end;
  696. };
  697. }
  698.  
  699. Shoot2 = function(orgpos)
  700. local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p)
  701. Effects["Sphere"].Create(BrickColor.new("White"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1)
  702. table.insert(Effects, {
  703. MouseLook.lookVector,
  704. "Shoot2",
  705. 50,
  706. orgpos,
  707. 5,
  708. 7,
  709. 0,
  710. 1,
  711. 2
  712. })
  713. end
  714.  
  715. function bulletstorm()
  716. attack = true
  717. CFuncs["Sound"].Create("rbxassetid://539881968", Torso, 1, 1)
  718. text.Text = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
  719. wait(1.5)
  720. for i = 0, 1, 0.025 do
  721. swait()
  722. PlayAnimationFromTable({
  723. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  724. 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),
  725. 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),
  726. 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),
  727. 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),
  728. 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),
  729. }, .3, false)
  730. CFuncs["Sound"].Create("rbxassetid://539882114", Torso, 1, 1)
  731. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  732. Shoot2(Barrel.Position)
  733. text.Text = "DOGE DUDEY"
  734. end
  735.  
  736. attack = false
  737. end
  738.  
  739. function overload()
  740. attack = true
  741. CFuncs["Sound"].Create("rbxassetid://159257147", Torso, 1, 1)
  742. text.Text = "AAAAAAAAAAAA"
  743. Shoot2(LeftArm.Position)
  744. Shoot2(RightArm.Position)
  745. Shoot2(RightLeg.Position)
  746. Shoot2(LeftLeg.Position)
  747. Shoot2(Head.Position)
  748. Shoot2(Torso.Position)
  749. wait(0)
  750. attack = false
  751. text.Text = "idiot with an inverted Doge"
  752. end
  753.  
  754. function overcharge()
  755. attack = true
  756. text.Text = "AAAAAAAAAAAA"
  757. CFuncs["Sound"].Create("rbxassetid://159257147", Torso, 1, 1)
  758. for i = 0, 1, 0.15 do
  759. swait()
  760. PlayAnimationFromTable({
  761. CFrame.new(-0.0325974114, -4.05311584e-006, 0.110728048, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  762. CFrame.new(0, 1.50000095, 0, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  763. 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),
  764. 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),
  765. 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),
  766. 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),
  767. }, .5, false)
  768. end
  769. wait(3)
  770. Shoot2(Barrel.Position)
  771. Shoot2(Barrel.Position)
  772. Shoot2(Handle.Position)
  773. Shoot2(Handle.Position)
  774. Shoot2(FakeHandle.Position)
  775. Shoot2(FakeHandle.Position)
  776. Shoot2(Barrel.Position)
  777. Shoot2(Barrel.Position)
  778. Shoot2(Handle.Position)
  779. Shoot2(Handle.Position)
  780. Shoot2(FakeHandle.Position)
  781. Shoot2(FakeHandle.Position)
  782. Shoot2(Barrel.Position)
  783. Shoot2(Barrel.Position)
  784. Shoot2(Handle.Position)
  785. Shoot2(Handle.Position)
  786. Shoot2(FakeHandle.Position)
  787. Shoot2(FakeHandle.Position)
  788. Shoot2(Barrel.Position)
  789. Shoot2(Barrel.Position)
  790. Shoot2(Handle.Position)
  791. Shoot2(Handle.Position)
  792. Shoot2(FakeHandle.Position)
  793. Shoot2(FakeHandle.Position)
  794. for i = 0, 1, 0.15 do
  795. swait()
  796. PlayAnimationFromTable({
  797. CFrame.new(2.70828605e-006, -0.356254776, -0.071654655, 0.499999046, -1.78813579e-007, -0.866026044, 0.150384009, 0.984807789, 0.0868238211, 0.852869093, -0.173648283, 0.492402941),
  798. 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),
  799. 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),
  800. 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),
  801. 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),
  802. 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),
  803. }, .35, false)
  804. text.Text = "idiot with a ShotGun"
  805. end
  806. attack = false
  807. end
  808.  
  809. function attackone()
  810. attack = true
  811. text.Text = "SHOTGUN POWERRRRR!!!3"
  812.  
  813. howtobasic1 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  814. howtobasic1.Volume = 45
  815. howtobasic1.SoundId = "rbxassetid://539882069"
  816. howtobasic2 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  817. howtobasic2.Volume = 45
  818. howtobasic2.SoundId = "rbxassetid://175678956"
  819. howtobasic3 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  820. howtobasic3.Volume = 45
  821. howtobasic3.SoundId = "rbxassetid://539882114"
  822. howtobasic = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  823. howtobasic.Volume = 45
  824. howtobasic.SoundId = "rbxassetid://175678956"
  825.  
  826. local Math = math.random(1,4)
  827. if Math == 1 then
  828. howtobasic:Play()
  829. end
  830. if Math == 2 then
  831. howtobasic1:Play()
  832. end
  833. if Math == 3 then
  834. howtobasic2:Play()
  835. end
  836. if Math == 4 then
  837. howtobasic3:Play()
  838. end
  839. for i = 0, 1, 0.025 do
  840. swait()
  841. PlayAnimationFromTable({
  842. CFrame.new(-0, -0, -0, 1, 0, 0, 1, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  843. 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),
  844. 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),
  845. 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),
  846. 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),
  847. 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),
  848. }, .3, false)
  849. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  850. end
  851. CFuncs["Sound"].Create("rbxassetid://145799973", Barrel, 5, 1)
  852. text.Text = "SOME IDIOT WITH A DOGE"
  853. Shoot2(Barrel.Position)
  854. for i = 0, 1, 0.15 do
  855. swait()
  856. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  857. PlayAnimationFromTable({
  858. 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),
  859. 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),
  860. 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),
  861. 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),
  862. 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),
  863. 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),
  864. }, .6, false)
  865. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3)
  866. end
  867. for i = 0, 1, 0.15 do
  868. swait()
  869. RootPart.Velocity = RootPart.CFrame.lookVector * -100
  870. PlayAnimationFromTable({
  871. 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),
  872. 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),
  873. 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),
  874. 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),
  875. 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),
  876. 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),
  877. }, .2, false)
  878. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3)
  879. end
  880. for i = 0, 1, 0.05 do
  881. swait()
  882. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  883. PlayAnimationFromTable({
  884. 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),
  885. 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),
  886. 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),
  887. 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),
  888. 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),
  889. 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),
  890. }, .3, false)
  891. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3)
  892. end
  893. for i = 0, 1, 0.13 do
  894. swait()
  895. PlayAnimationFromTable({
  896. 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),
  897. 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),
  898. 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),
  899. 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),
  900. 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),
  901. 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),
  902. }, .3, false)
  903. end
  904. attack = false
  905. end
  906.  
  907. --[[Attacks]]--
  908.  
  909. mouse.Button1Down:connect(function()
  910. if attack == false and attacktype == 1 then
  911. attackone()
  912. end
  913. end)
  914.  
  915.  
  916. mouse.KeyDown:connect(function(k)
  917. k = k:lower()
  918. if attack == false and k == 'q' then
  919. bulletstorm()
  920. elseif attack == false and k == 'e' then
  921. overload()
  922. elseif attack == false and k == 'r' then
  923. overcharge()
  924. end
  925. end)
  926.  
  927. while true do
  928. swait()
  929. for i, v in pairs(Character:GetChildren()) do
  930. if v:IsA("Part") then
  931. v.Material = "SmoothPlastic"
  932. elseif v:IsA("Accessory") then
  933. v:WaitForChild("Handle").Material = "SmoothPlastic"
  934. end
  935. end
  936. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  937. velocity = RootPart.Velocity.y
  938. sine = sine + change
  939. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  940. if equipped == true or equipped == false then
  941. if RootPart.Velocity.y > 1 and hit == nil then
  942. Anim = "Jump"
  943. if attack == false then
  944. PlayAnimationFromTable({
  945. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  946. 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),
  947. 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),
  948. 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),
  949. 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),
  950. 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),
  951. }, .3, false)
  952. end
  953. elseif RootPart.Velocity.y < -60 and hit == nil then
  954. Anim = "Fall"
  955. if attack == false then
  956. PlayAnimationFromTable({
  957. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  958. 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),
  959. 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),
  960. 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),
  961. 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),
  962. 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),
  963. }, .3, false)
  964. end
  965. elseif Torsovelocity < 1 and hit ~= nil then
  966. Anim = "Idle"
  967. if attack == false then
  968. change = 1
  969. PlayAnimationFromTable({
  970. 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),
  971. 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),
  972. 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),
  973. 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),
  974. 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),
  975. 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),
  976. }, .3, false)
  977. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  978. end
  979. elseif Torsovelocity > 2 and hit ~= nil then
  980. Anim = "Walk"
  981. if attack == false then
  982. change = 3
  983. PlayAnimationFromTable({
  984. 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),
  985. 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),
  986. 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),
  987. 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),
  988. 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)),
  989. 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)),
  990. }, .3, false)
  991. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
  992. end
  993. end
  994. end
  995. if 0 < #Effects then
  996. for e = 1, #Effects do
  997. if Effects[e] ~= nil then
  998. local Thing = Effects[e]
  999. if Thing ~= nil then
  1000. local Part = Thing[1]
  1001. local Mode = Thing[2]
  1002. local Delay = Thing[3]
  1003. local IncX = Thing[4]
  1004. local IncY = Thing[5]
  1005. local IncZ = Thing[6]
  1006. if Thing[2] == "Shoot" then
  1007. local Look = Thing[1]
  1008. local hit, pos = rayCast(Thing[4], Look, 15, Character)
  1009. local mag = (Thing[4] - pos).magnitude
  1010. Thing[9] = Thing[9] + 0.5
  1011. Thing[5] = Thing[5] + 0.2
  1012. Thing[6] = Thing[6] + 0.2
  1013. Effects["Cylinder"].Create(BrickColor.new("White"), 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)
  1014. Thing[4] = Thing[4] + Look * 15
  1015. Thing[3] = Thing[3] - 1
  1016. if hit ~= nil then
  1017. Thing[3] = 0
  1018. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("White"), "Reference", Vector3.new())
  1019. ref.Anchored = true
  1020. ref.CFrame = CFrame.new(pos)
  1021. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1022. CFuncs["Sound"].Create("rbxassetid://539881968", ref, 0.1, 1)
  1023. game:GetService("Debris"):AddItem(ref, 10)
  1024. end
  1025. if Thing[3] <= 0 then
  1026. table.remove(Effects, e)
  1027. end
  1028. end
  1029. do
  1030. if Thing[2] == "Shoot2" then
  1031. local Look = Thing[1]
  1032. local hit, pos = rayCast(Thing[4], Look, 3, Character)
  1033. local mag = (Thing[4] - pos).magnitude
  1034. Thing[9] = Thing[9] + 0.5
  1035. Thing[5] = Thing[5] + 0.2
  1036. Thing[6] = Thing[6] + 0.2
  1037. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2)
  1038. Thing[4] = Thing[4] + Look * 3
  1039. Thing[3] = Thing[3] + 5
  1040. if hit ~= nil then
  1041. Thing[3] = 0
  1042. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("White"), "Reference", Vector3.new())
  1043. ref.Anchored = true
  1044. ref.CFrame = CFrame.new(pos)
  1045. Effects["Sphere"].Create(BrickColor.new("Really yellow"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01)
  1046. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01)
  1047. Effects["Block"].Create(BrickColor.new("White"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1)
  1048. Effects["Wave"].Create(BrickColor.new("Really red"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01)
  1049. CFuncs["Sound"].Create("rbxassetid://151778863", ref, 1, 1)
  1050. CFuncs["Sound"].Create("rbxassetid://151778863", Sphere, 0.5, 1)
  1051. CFuncs["Sound"].Create("rbxassetid://151778863", Sphere, 0.1, 1)
  1052. local e = Instance.new("Explosion", ref)
  1053. e.Position = ref.Position
  1054. e.BlastRadius = 400
  1055. e.DestroyJointRadiusPercent = 400
  1056. e.Visible = false
  1057. e.ExplosionType = "CratersAndDebris"
  1058. game:GetService("Debris"):AddItem(ref, 2)
  1059. end
  1060. if Thing[3] <= 0 then
  1061. table.remove(Effects, e)
  1062. end
  1063. end
  1064. do
  1065. do
  1066. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then
  1067. if Thing[1].Transparency <= 1 then
  1068. if Thing[2] == "Block1" then
  1069. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1070. Mesh = Thing[7]
  1071. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1072. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1073. else
  1074. if Thing[2] == "Block2" then
  1075. Thing[1].CFrame = Thing[1].CFrame
  1076. Mesh = Thing[7]
  1077. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1078. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1079. else
  1080. if Thing[2] == "Block3" then
  1081. Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9]
  1082. Mesh = Thing[7]
  1083. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1084. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1085. else
  1086. if Thing[2] == "Cylinder" then
  1087. Mesh = Thing[7]
  1088. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1089. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1090. else
  1091. if Thing[2] == "Cylinder2" then
  1092. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0)
  1093. Mesh = Thing[7]
  1094. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1095. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1096. else
  1097. if Thing[2] == "Blood" then
  1098. Mesh = Thing[7]
  1099. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1100. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1101. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1102. else
  1103. if Thing[2] == "Elec" then
  1104. Mesh = Thing[10]
  1105. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1106. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1107. else
  1108. if Thing[2] == "Disappear" then
  1109. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1110. end
  1111. end
  1112. end
  1113. end
  1114. end
  1115. end
  1116. end
  1117. end
  1118. else
  1119. Part.Parent = nil
  1120. table.remove(Effects, e)
  1121. end
  1122. end
  1123. end
  1124. end
  1125. end
  1126. end
  1127. end
  1128. end
  1129. end
  1130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement