Advertisement
Void_scripter0

gold

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