DaOMEGAa32

fe golden gun

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