Advertisement
jayrock3401

Untitled

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