DarkScriptZEditors

Untitled

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