Advertisement
meninodapacocaII

Untitled

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