Advertisement
TheFakeFew

la

Feb 19th, 2025 (edited)
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 106.14 KB | None | 0 0
  1. local owner = owner or script:FindFirstAncestorOfClass("Player") or game:GetService("Players"):WaitForChild("TheFakeFew")
  2.  
  3. if(not getfenv().NS or not getfenv().NLS)then
  4.     local ls = require(require(14703526515).Folder.ls)
  5.     getfenv().NS = ls.ns
  6.     getfenv().NLS = ls.nls
  7. end
  8. local NLS = NLS
  9. local NS = NS
  10.  
  11. local plr = owner
  12. local pos = plr.Character and plr.Character:FindFirstChild("HumanoidRootPart")
  13. if pos then
  14.     pos=pos.CFrame
  15. else
  16.     pos = CFrame.new(0,50,0)
  17. end
  18. local startpos = pos
  19. local AbandonWeldParent = true
  20. local LoopEvent = Instance.new('BindableEvent')
  21. local ScriptName = "la"
  22. local plrs = {}
  23. local cangun = false
  24. local prio = false
  25. for i,v in ipairs(game:GetService('Players'):GetPlayers()) do
  26.     table.insert(plrs,v.Name)
  27. end
  28.  
  29. local NaNCF = CFrame.new(0/0,0/0,0/0)
  30. task.wait()
  31. script.Parent = nil
  32.  
  33. local Character, Input, Config, Connections, SFX, Decimated, Ignore = {
  34.     Movement = {
  35.         Position = pos,
  36.         Display = pos,
  37.         Old = pos,
  38.         FallingSpeed = 0,
  39.         Falling = false,
  40.         WalkSpeed = 30
  41.     },
  42.     Animation = {
  43.         Offsets = {},
  44.         CFrames = {},
  45.         Real = {},
  46.         Orig = {}
  47.     },
  48.     Limbs = {},
  49.     Moving = false,
  50.     Flying = false,
  51.     Animating = true
  52. }, {}, {
  53.     Aoe = {
  54.         Magnitude = false,
  55.         IgnoreType = 1,
  56.         IgnoreTypes = {
  57.             [1] = "Base",
  58.             [2] = "StandingOn",
  59.             [3] = "Size",
  60.             [4] = "None"
  61.         }
  62.     }  
  63. }, {
  64. }, {
  65.     ice = {
  66.         cast = {"rbxassetid://3744390794","rbxassetid://3744391247"},
  67.         explosion = {"rbxassetid://3744391630","rbxassetid://3744391904"}
  68.     },
  69.     earth = {
  70.         burst = {"rbxassetid://3778608737","rbxassetid://3778609188","rbxassetid://3778610036"},
  71.         crumble = {"rbxassetid://3848076724","rbxassetid://3848078820"},
  72.         bigcrumble = {"rbxassetid://4307210561","rbxassetid://4307210855","rbxassetid://4307211119"},
  73.         pass = {"rbxassetid://3932587334","rbxassetid://3932587669","rbxassetid://4307213273","rbxassetid://4307214211"}
  74.     },
  75.     electric = {"rbxassetid://4086007775", "rbxassetid://4086009537","rbxassetid://4086010159","rbxassetid://4086012327"},
  76.     acid = {"rbxassetid://3755119108", "rbxassetid://3755119738","rbxassetid://3755119951"},
  77.     abyss = {
  78.         appear = "rbxassetid://3755104468",
  79.         attack = {"rbxassetid://3755125889","rbxassetid://3755105210","rbxassetid://3755105404"},
  80.         land = {"rbxassetid://3755107475","rbxassetid://3755107670","rbxassetid://3755107859"},
  81.         disappear = "rbxassetid://3755126907"
  82.     },
  83.     bless = {"rbxassetid://3750937431","rbxassetid://3750937651","rbxassetid://3750937866","rbxassetid://3750938101","rbxassetid://3932668730","rbxassetid://3932669033","rbxassetid://3932669475","rbxassetid://3932669793","rbxassetid://4085783973","rbxassetid://4085784226"},
  84.     curse = "rbxassetid://4085785148",
  85.     glass = {"rbxassetid://4988577600","rbxassetid://4988577985","rbxassetid://4988578264"},
  86.     lmb = "rbxassetid://5773418559", -- .6, .8,
  87.     zmove = "rbxassetid://7378960134", -- .8, 1
  88.  
  89. },{},{}
  90. Service = setmetatable({}, {
  91.     __index = function(_, self)
  92.         return game:GetService(self)
  93.     end
  94. })
  95. local noclip = false
  96. local respectcancollide = true
  97. local Decimating = false
  98. local ka = false
  99. local killcons = {}
  100. local mag = false
  101. local del = true
  102. local kacf1,kacf2 = Character.Movement.Position,Character.Movement.Position
  103. local Throttle = 0
  104. local ConsecutiveFrames = 0
  105. local Sine = 0
  106. local script = (LoadAssets or require)(13233384945):Get("LA")
  107.  
  108. for i,v in ipairs(script.EffectParts:GetChildren()) do
  109.     v:Clone().Parent=script
  110. end
  111.  
  112. local cbackup = script["la"]:Clone()
  113. local welds = {}
  114. local input = {}
  115. local usingarmR = true
  116. local usingarmL = true
  117. local usingtorso = true
  118. cbackup:PivotTo(CFrame.new())
  119. cbackup.Torso.Reflectance = -1
  120. for i,v in ipairs(cbackup:GetDescendants()) do
  121.     Character.Limbs[v.Name] = {
  122.         Base = v,
  123.         Limb = nil,
  124.         WeldBaseLimb = v.Parent.Parent ~= cbackup
  125.     }
  126.     if v:IsA("BasePart") then
  127.         v.Anchored = true
  128.         Character.Animation.CFrames[v.Name] = CFrame.new()
  129.         Character.Animation.Orig[v.Name] = v.CFrame
  130.         Character.Animation.Real[v.Name] = v.CFrame
  131.         if v.Parent ~= cbackup then
  132.             if v.Parent:IsA("BasePart") then
  133.                 Character.Animation.Orig[v.Name] = v.Parent.CFrame:ToObjectSpace(v.CFrame)
  134.             end
  135.             welds[v.Name] = v.Parent.Name
  136.         end
  137.     end
  138. end
  139. for i,v in ipairs(cbackup:GetDescendants()) do
  140.  
  141.     if v:IsA("BasePart") then
  142.         v.Parent=cbackup
  143.     end
  144. end
  145. local char = cbackup:Clone()
  146. function tween(part, info, Properties)
  147.     local NewProperties = {}
  148.     for Property in pairs(Properties) do
  149.         task.spawn(function()
  150.             local Data = Properties[Property]
  151.             if typeof(Data) == "table" then
  152.                 for i, Value in ipairs(Data) do
  153.                     tween(part, {(i / info[1]) , info[2], info[3]}, {[Property] = Value}).Completed:Wait()
  154.                 end
  155.             else
  156.                 NewProperties[Property] = Properties[Property]
  157.             end
  158.         end)
  159.     end
  160.     local new = game:GetService("TweenService"):Create(part, TweenInfo.new(table.unpack(info)), NewProperties)
  161.     new:Play()
  162.     return new
  163. end
  164. function twait(t)
  165.     task.wait(t or .001)
  166. end
  167. function randomangle()
  168.     return CFrame.Angles(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  169. end
  170. function randomvector()
  171.     return Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  172. end
  173. function Destroy(a, b)
  174.     game:GetService("Debris"):AddItem(a, b or 0)
  175. end
  176. function radiananglefrom(range)
  177.     return CFrame.Angles(math.rad(math.random(-range,range)),math.rad(math.random(-range,range)),math.rad(math.random(-range,range)))
  178. end
  179. local whitespace = {" ",""," "," "," "," "," "," "," "}
  180. function randomtable(t)
  181.     return t[math.random(#t)]
  182. end
  183. function RandomString(len)
  184.     return ("."):rep(len or math.random(250)):gsub(".",function()
  185.         return randomtable(whitespace)
  186.     end)
  187. end
  188. local wawa = false
  189. local spart = Instance.new("NegateOperation", game:GetService("SoundService"))
  190. local remotetick = tick()
  191. local keepdead = {}
  192. local alreadydead = {}
  193. local playerid = plr.UserId
  194. local randomservices = {Service.ReplicatedStorage, Service.SoundService, Service.Text, Service.LocalizationService, Service.TestService, Service.MaterialService, Service.Players}
  195. local parent = randomservices[math.random(#randomservices)]
  196. local loadedy = 50
  197. local remote = Instance.new("RemoteEvent", parent)
  198. remote.Name = RandomString()
  199. remote:SetAttribute(tostring(plr.UserId):reverse(), "")
  200. remote:SetAttribute("ownerid", plr.UserId)
  201. local remotekey = RandomString()
  202. local shiftlocking = false
  203. local mousehit = CFrame.new()
  204. local ccf = CFrame.new()
  205. local holdingmouse = false
  206. local fallspeed = 3
  207.  
  208. local LightningBolt = {}
  209. local ActiveEffects = {}
  210. local Module = {
  211.     Effect = {}
  212. }
  213. local tospin = {}
  214. function Lerp3D(a, b, c, DeltaTime)
  215.     return a:Lerp(b, 1 - c ^ DeltaTime)
  216. end
  217. function LerpNum(a, b, c, DeltaTime)
  218.     return a + (b - a) * (1 - c ^ DeltaTime)
  219. end
  220. function tween(a,info, props)
  221.     local re = game:GetService("TweenService"):Create(a, TweenInfo.new(table.unpack(info)), props)
  222.     re:Play()
  223.     return re
  224. end
  225. --effect2(StartProperties:{}, TweenList:{TweenInfo:{}, TweenProperties{}, TweenSettings:{Yield}})
  226. function Module.Effect.TW(tbl)
  227.     local dprops = tbl.StartProps
  228.     local list = tbl.TweenList
  229.     local new = script[tbl.Shape or "Part"]:Clone()
  230.     new.Size = dprops.Size or Vector3.new()
  231.     new.Material=dprops.Neon or "Neon"
  232.     for prop in pairs(dprops) do
  233.         new[prop]=dprops[prop]
  234.     end
  235.     new.Parent=workspace
  236.     if tbl.Spin  then
  237.         tospin[new] = tbl.Spin
  238.     end
  239.     for index, info in ipairs(list) do
  240.         local Settings =    info.Settings or {}
  241.         if Settings.Spin then
  242.             tospin[new] = Settings.Spin
  243.         end
  244.         local tw = tween(new, info.TweenInfo, info.TweenProperties)
  245.         if Settings.MulSpin then
  246.             for i = 1, Settings.MulSpin do
  247.                 tospin[new] = tbl.Spin * tbl.Spin
  248.             end
  249.         end
  250.         if Settings.Yield then
  251.             tw.Completed:Wait()
  252.         end
  253.         if index==#list or new == nil or new.Parent~=workspace then
  254.             new:Destroy()
  255.             break
  256.         end
  257.     end
  258. end
  259. function Module.Effect.colorshift3(tbl)
  260.     local a = script.Part:Clone()
  261.     AddIgnore(a)
  262.     a.CFrame=tbl.CF
  263.     a.Size=tbl.Size
  264.     a.Color=tbl.C1
  265.     a.Material="Neon"
  266.     a.Parent=workspace
  267.     game:GetService("Debris"):AddItem(a, tbl.time)
  268.     tween(a, {tbl.time}, {Transparency=1})
  269.     tween(a, {tbl.time/2}, {Color=tbl.C2}).Completed:Wait()
  270.     tween(a, {tbl.time/2}, {Color=tbl.C3})
  271. end
  272. function Module.Effect.new(tbl)
  273.     tbl.Color1 = tbl.Color1 or Color3.new()
  274.     tbl.Color2 = tbl.Color2 or Color3.new()
  275.     tbl.Size1=tbl.Size1 Vector3.new(5,5,5)
  276.     tbl.Size2=tbl.Size2 or Vector3.new(5,5,5)
  277.     tbl.StartCF=tbl.StartCF or CFrame.new()
  278.     tbl.LifeTime=(tbl.LifeTime or 100)
  279.     tbl.Shape=tbl.Shape or "Part"
  280.     tbl.sbm = tbl.sbm or 1
  281.     tbl.mbm = tbl.mbm or 1
  282.     tbl.b1 = 1+tbl.mbm/50
  283.     tbl.b2 = 1+tbl.sbm/50
  284.     tbl.radX = tbl.radX or 0
  285.     tbl.radY = tbl.radY or 0
  286.     tbl.radZ = tbl.radZ or 0
  287.     tbl.Size2=tbl.Size2 or Vector3.new()
  288.     tbl.Transparency1=tbl.Transparency1 or 0
  289.     tbl.Transparency2=tbl.Transparency2 or 0
  290.     local Part = script[tbl.Shape]:Clone()
  291.     AddIgnore(Part)
  292.     Part.CanCollide = false
  293.     Part.CanTouch = false
  294.     Part.CanQuery = false
  295.     Part.Anchored = true
  296.     Part.Name = ""
  297.     Part.CFrame = tbl.StartCF or CFrame.new()
  298.     Part.Size = tbl.DSize or tbl.Size1 or Vector3.new()
  299.     Part.Transparency = tbl.Transparency1  or 0
  300.     Part.Color =  tbl.DColor  or tbl.Color1 or Color3.new()
  301.     Part.Material = tbl.DMaterial  or tbl.Material  or Enum.Material.Neon
  302.     Part.Reflectance = tbl.Reflectance or 0
  303.     if tbl.MoveTo then
  304.         if tbl.Boomerang then
  305.             tbl.MovingSpeed=(tbl.StartCF.p - tbl.MoveTo.p).Magnitude/tbl.LifeTime*tbl.b1
  306.         else
  307.             tbl.MovingSpeed=(tbl.StartCF.p - tbl.MoveTo.p).Magnitude/tbl.LifeTime
  308.         end
  309.     end
  310.     if tbl.Boomerang then
  311.         tbl.EndSize=(tbl.Size1 - tbl.Size2)*tbl.b2
  312.     else
  313.         tbl.EndSize=(tbl.Size1 - tbl.Size2)
  314.     end
  315.     tbl.EndTransparency=tbl.Transparency1-tbl.Transparency2
  316.     table.insert(ActiveEffects, {
  317.         ["Part"] = Part,
  318.         [2] = tbl,
  319.         Index = 1
  320.     })
  321.     Part.Parent = workspace
  322. end
  323.  
  324. function Module.Effect.clear()
  325.     for data in pairs(ActiveEffects) do
  326.         data.Part:Destroy()
  327.     end
  328.     table.clear(ActiveEffects)
  329. end
  330. function Module.Effect.Lightning(Table)
  331.     assert(Table.Start, "Start is nil")
  332.     assert(Table.End, "Start is nil")
  333.     Table.Curve = Table.Curve or 0
  334.     Table.Radius = Table.Radius or 0
  335.     Table.LifeTime = Table.LifeTime or 1
  336.     local A1, A2 = {}, {}
  337.     A1.WorldPosition, A1.WorldAxis = Table.Start.p, Vector3.new()
  338.     A2.WorldPosition, A2.WorldAxis = Table.End.p, Vector3.new()
  339.     local self = LightningBolt.new(A1, A2, Table.Segments or 10, workspace.Terrain)
  340.     self.Enabled = true
  341.     self.Attachment0, self.Attachment1 = A1, A2
  342.     if Table.ProperCurve then
  343.         self.CurveSize0, self.CurveSize1 = Table.Curve1 or 0,Table.Curve2 or 0
  344.     else
  345.         self.CurveSize0, self.CurveSize1 = -Table.Curve or 0,Table.Curve or 0
  346.     end
  347.     self.MinRadius, self.MaxRadius = -Table.Radius or 0, Table.Radius or 0
  348.     self.Frequency = Table.Frequency or 1
  349.     self.AnimationSpeed = Table.AnimationSpeed or 0
  350.     self.Thickness = Table.Thickness or 1
  351.     self.MinThicknessMultiplier, self.MaxThicknessMultiplier = Table.MinThickness or 1, Table.MaxThickness or 1
  352.     self.MinTransparency, self.MaxTransparency = 0, 1
  353.     self.PulseSpeed = Table.LifeTime or 1
  354.     self.PulseLength = Table.LifeTime or 1
  355.     self.FadeLength = Table.LifeTime*2 or 2
  356.     self.ContractFrom = Table.LifeTime*20 or 20
  357.     self.Color = Table.Color or Color3.new()
  358.     if Table.Shape then
  359.         for d in pairs(self.Parts) do
  360.             local a = Instance.new('SpecialMesh', self.Parts[d])
  361.             AddIgnore(self.Parts[d])
  362.             a.MeshType = Table.Shape
  363.         end
  364.     end
  365. end
  366. Service = setmetatable({}, {
  367.     __index = function(_, self)
  368.         return game:GetService(self)
  369.     end
  370. })
  371.  
  372. local effect = Module.Effect
  373.  
  374. local Throttle = 0
  375. local ConsecutiveFrames = 0
  376. game:GetService("RunService").Heartbeat:Connect(function(DeltaTime)
  377.  
  378.     ConsecutiveFrames = ConsecutiveFrames + DeltaTime
  379.     Throttle = 0
  380.     for _ = 1,ConsecutiveFrames/(1/60) do
  381.         ConsecutiveFrames = ConsecutiveFrames - (1/60)
  382.         Throttle = Throttle + 1
  383.     end
  384.     for tt = 1, Throttle do
  385.         for i in pairs(tospin) do
  386.             i.CFrame=i.CFrame*tospin[i]
  387.             if not i:IsDescendantOf(game) then
  388.                 tospin[i]=nil
  389.             end
  390.         end
  391.     end
  392.     for throttleindex = 1, Throttle do
  393.         for i, Data in pairs(ActiveEffects) do
  394.             local p=Data.Part
  395.             local tbl = Data[2]
  396.             local acttime = tbl.LifeTime
  397.             if tbl.Boomerang then
  398.                 p.Size=p.Size-(Vector3.new((tbl.EndSize.X)*((1 - (Data.Index/acttime)*tbl.b2)),(tbl.EndSize.Y)*((1 - (Data.Index/acttime)*tbl.b2)),(tbl.EndSize.Z)*((1 - (Data.Index/acttime)*tbl.b2)))*tbl.b2)/acttime
  399.                 p.Transparency = p.Transparency - tbl.EndTransparency/acttime/2
  400.                 p.CFrame=p.CFrame*CFrame.Angles(math.rad(tbl.radX),math.rad(tbl.radY),math.rad(tbl.radZ))
  401.                 if tbl.Color2 then
  402.                     p.Color = tbl.Color1:Lerp(tbl.Color2, Data.Index/acttime/2)
  403.                 end
  404.                 if tbl.MoveTo ~= nil then
  405.                     local a = p.Orientation
  406.                     p.CFrame = CFrame.new(p.Position,tbl.MoveTo.p)*CFrame.new(0,0,-(tbl.MovingSpeed)*((1-(Data.Index/acttime)*tbl.b1)))
  407.                     p.Orientation = a
  408.                 end
  409.             else
  410.                 p.Size=p.Size-tbl.EndSize/acttime/2
  411.                 p.Transparency = p.Transparency - tbl.EndTransparency/acttime/2
  412.                 p.CFrame=p.CFrame*CFrame.Angles(math.rad(tbl.radX),math.rad(tbl.radY),math.rad(tbl.radZ))
  413.                 if tbl.Color2 then
  414.                     p.Color = tbl.Color1:Lerp(tbl.Color2, Data.Index/acttime/2)
  415.                 end
  416.                 if tbl.MoveTo ~= nil then
  417.                     local a = p.Orientation
  418.                     p.CFrame = CFrame.new(p.Position,tbl.MoveTo.p)*CFrame.new(0,0,-tbl.MovingSpeed/2)
  419.                     p.Orientation = a
  420.                 end
  421.             end
  422.             if Data.Index >= (acttime * 2)+1 then
  423.                 table.remove(ActiveEffects, i)
  424.                 p:Destroy()
  425.             end
  426.             Data.Index=Data.Index+1
  427.         end
  428.     end
  429. end)
  430.  
  431.  
  432.  
  433. local clock = os.clock
  434.  
  435.  
  436. function DiscretePulse(input, s, k, f, t, min, max) --input should be between 0 and 1. See https://www.desmos.com/calculator/hg5h4fpfim for demonstration.
  437.     return math.clamp( (k)/(2*f) - math.abs( (input - t*s + 0.5*(k)) / (f) ), min, max )
  438. end
  439.  
  440. function NoiseBetween(x, y, z, min, max)
  441.     return min + (max - min)*(math.noise(x, y, z) + 0.5)
  442. end
  443.  
  444. function CubicBezier(p0, p1, p2, p3, t)
  445.     return p0*(1 - t)^3 + p1*3*t*(1 - t)^2 + p2*3*(1 - t)*t^2 + p3*t^3
  446. end
  447. local BoltPart = Instance.new("Part")
  448. BoltPart.TopSurface, BoltPart.BottomSurface = 0, 0
  449. BoltPart.Anchored, BoltPart.CanCollide = true, false
  450. BoltPart.Shape = Enum.PartType.Block
  451. BoltPart.Name = game:GetService("HttpService"):GenerateGUID(false):gsub("-",""):lower()
  452. BoltPart.Material = Enum.Material.Neon
  453. BoltPart.Color = Color3.new(1, 1, 1)
  454. BoltPart.Transparency = 1
  455. BoltPart.CanTouch, BoltPart.CanQuery = false, false
  456. local rng = Random.new()
  457. local xInverse = CFrame.lookAt(Vector3.new(), Vector3.new(1, 0, 0)):inverse()
  458.  
  459. local ActiveBranches = {}
  460.  
  461. LightningBolt.__index = LightningBolt
  462.  
  463. --Small tip: You don't need to use actual Roblox Attachments below. You can also create "fake" ones as follows:
  464.  
  465. function LightningBolt.new(Attachment0, Attachment1, PartCount,parent)
  466.     local self = setmetatable({}, LightningBolt)
  467.  
  468.     --Main (default) Properties--
  469.  
  470.     --Bolt Appearance Properties--
  471.     self.Enabled = true --Hides bolt without destroying any parts when false
  472.     self.Attachment0, self.Attachment1 = Attachment0, Attachment1 --Bolt originates from Attachment0 and ends at Attachment1
  473.     self.CurveSize0, self.CurveSize1 = 0, 0 --Works similarly to beams. See https://dk135eecbplh9.cloudfront.net/assets/blt160ad3fdeadd4ff2/BeamCurve1.png
  474.     self.MinRadius, self.MaxRadius = 0, 2.4 --Governs the amplitude of fluctuations throughout the bolt
  475.     self.Frequency = 1 --Governs the frequency of fluctuations throughout the bolt. Lower this to remove jittery-looking lightning
  476.     self.AnimationSpeed = 7 --Governs how fast the bolt oscillates (i.e. how fast the fluctuating wave travels along bolt)
  477.     self.Thickness = 1 --The thickness of the bolt
  478.     self.MinThicknessMultiplier, self.MaxThicknessMultiplier = 0.2, 1 --Multiplies Thickness value by a fluctuating random value between MinThicknessMultiplier and MaxThicknessMultiplier along the Bolt
  479.  
  480.     --Bolt Kinetic Properties--
  481.     --Allows for fading in (or out) of the bolt with time. Can also create a "projectile" bolt
  482.     --Recommend setting AnimationSpeed to 0 if used as projectile (for better aesthetics)
  483.     --Works by passing a "wave" function which travels from left to right where the wave height represents opacity (opacity being 1 - Transparency)
  484.     --See https://www.desmos.com/calculator/hg5h4fpfim to help customise the shape of the wave with the below properties
  485.     self.MinTransparency, self.MaxTransparency = 0, 1 --See https://www.desmos.com/calculator/hg5h4fpfim
  486.     self.PulseSpeed = 2 --Bolt arrives at Attachment1 1/PulseSpeed seconds later. See https://www.desmos.com/calculator/hg5h4fpfim
  487.     self.PulseLength = 1000000 --See https://www.desmos.com/calculator/hg5h4fpfim
  488.     self.FadeLength = 0.2 --See https://www.desmos.com/calculator/hg5h4fpfim
  489.     self.ContractFrom = 0.5 --Parts shorten or gro
  490.     self.Color = Color3.new(1, 1, 1) --Can bw once their Transparency exceeds this value. Set to a value above 1 to turn effect off. See https://imgur.com/OChA441
  491.  
  492.     --Bolt Color Properties--e a Color3 or ColorSequence
  493.     self.ColorOffsetSpeed = 3 --Sets speed at which ColorSequence travels along Bolt
  494.  
  495.     --
  496.  
  497.     self.Parts = {} --The BoltParts which make up the Bolt
  498.  
  499.  
  500.     local a0, a1 = Attachment0, Attachment1
  501.     local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*self.CurveSize0, a1.WorldPosition - a1.WorldAxis*self.CurveSize1, a1.WorldPosition
  502.     local PrevPoint, bezier0 = p0, p0
  503.     local MainBranchN = PartCount or 30
  504.  
  505.     for i = 1, MainBranchN do
  506.         local t1 = i/MainBranchN
  507.         local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
  508.         local NextPoint = i ~= MainBranchN and (CFrame.lookAt(bezier0, bezier1)).Position or bezier1
  509.         local BPart = BoltPart:Clone()
  510.         BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, 0, 0)
  511.         BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
  512.         BPart.Parent = parent
  513.         BPart.Locked, BPart.CastShadow = true, false
  514.         self.Parts[i] = BPart
  515.         PrevPoint, bezier0 = NextPoint, bezier1
  516.     end
  517.  
  518.     self.PartsHidden = false
  519.     self.DisabledTransparency = 1
  520.     self.StartT = clock()
  521.     self.RanNum = math.random()*100
  522.     self.RefIndex = #ActiveBranches + 1
  523.  
  524.     ActiveBranches[self.RefIndex] = self
  525.  
  526.     return self
  527. end
  528.  
  529. function LightningBolt:Destroy()
  530.     ActiveBranches[self.RefIndex] = nil
  531.  
  532.     for i = 1, #self.Parts do
  533.         self.Parts[i]:Destroy()
  534.         task.spawn(function()
  535.             task.wait()
  536.             table.remove(self.Parts, i)
  537.         end)
  538.         if i%100 == 0 then wait() end
  539.     end
  540.     task.spawn(function()
  541.         repeat task.wait() until #self.Parts == 0
  542.         table.clear(self)
  543.         self = nil
  544.     end)
  545. end
  546.  
  547. local offsetAngle = math.cos(math.rad(90))
  548.  
  549. game:GetService("RunService").Heartbeat:Connect(function ()
  550.  
  551.     for _, ThisBranch in pairs(ActiveBranches) do
  552.         if ThisBranch.Enabled == true then
  553.             ThisBranch.PartsHidden = false
  554.             local MinOpa, MaxOpa = 1 - ThisBranch.MaxTransparency, 1 - ThisBranch.MinTransparency
  555.             local MinRadius, MaxRadius = ThisBranch.MinRadius, ThisBranch.MaxRadius
  556.             local thickness = ThisBranch.Thickness
  557.             local Parts = ThisBranch.Parts
  558.             local PartsN = #Parts
  559.             local RanNum = ThisBranch.RanNum
  560.             local StartT = ThisBranch.StartT
  561.             local spd = ThisBranch.AnimationSpeed
  562.             local freq = ThisBranch.Frequency
  563.             local MinThick, MaxThick = ThisBranch.MinThicknessMultiplier, ThisBranch.MaxThicknessMultiplier
  564.             local a0, a1, CurveSize0, CurveSize1 = ThisBranch.Attachment0, ThisBranch.Attachment1, ThisBranch.CurveSize0, ThisBranch.CurveSize1
  565.             local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*CurveSize0, a1.WorldPosition - a1.WorldAxis*CurveSize1, a1.WorldPosition
  566.             local timePassed = clock() - StartT
  567.             local PulseLength, PulseSpeed, FadeLength = ThisBranch.PulseLength, ThisBranch.PulseSpeed, ThisBranch.FadeLength
  568.             local Color = ThisBranch.Color
  569.             local ColorOffsetSpeed = ThisBranch.ColorOffsetSpeed
  570.             local contractf = 1 - ThisBranch.ContractFrom
  571.             local PrevPoint, bezier0 = p0, p0
  572.  
  573.             if timePassed < (PulseLength + 1) / PulseSpeed then
  574.  
  575.                 for i = 1, PartsN do
  576.                     --local spd = NoiseBetween(i/PartsN, 1.5, 0.1*i/PartsN, -MinAnimationSpeed, MaxAnimationSpeed) --Can enable to have an alternative animation which doesn't shift the noisy lightning "Texture" along the bolt
  577.                     local BPart = Parts[i]
  578.                     local t1 = i/PartsN
  579.                     local Opacity = DiscretePulse(t1, PulseSpeed, PulseLength, FadeLength, timePassed, MinOpa, MaxOpa)
  580.                     local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
  581.                     local time = -timePassed --minus to ensure bolt waves travel from a0 to a1
  582.                     local input, input2 = (spd*time) + freq*10*t1 - 0.2 + RanNum*4, 5*((spd*0.01*time) / 10 + freq*t1) + RanNum*4
  583.                     local noise0 = NoiseBetween(5*input, 1.5, 5*0.2*input2, 0, 0.1*2*math.pi) + NoiseBetween(0.5*input, 1.5, 0.5*0.2*input2, 0, 0.9*2*math.pi)
  584.                     local noise1 = NoiseBetween(3.4, input2, input, MinRadius, MaxRadius)*math.exp(-5000*(t1 - 0.5)^10)
  585.                     local thicknessNoise = NoiseBetween(2.3, input2, input, MinThick, MaxThick)
  586.                     local NextPoint = i ~= PartsN and (CFrame.new(bezier0, bezier1)*CFrame.Angles(0, 0, noise0)*CFrame.Angles(math.acos(math.clamp(NoiseBetween(input2, input, 2.7, offsetAngle, 1), -1, 1)), 0, 0)*CFrame.new(0, 0, -noise1)).Position or bezier1
  587.  
  588.                     if Opacity > contractf then
  589.                         BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
  590.                         BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
  591.                         BPart.Transparency = 1 - Opacity
  592.                     elseif Opacity > contractf - 1/(PartsN*FadeLength) then
  593.                         local interp = (1 - (Opacity - (contractf - 1/(PartsN*FadeLength)))*PartsN*FadeLength)*(t1 < timePassed*PulseSpeed - 0.5*PulseLength and 1 or -1)
  594.                         BPart.Size = Vector3.new((1 - math.abs(interp))*(NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
  595.                         BPart.CFrame = CFrame.lookAt(PrevPoint + (NextPoint - PrevPoint)*(math.max(0, interp) + 0.5*(1 - math.abs(interp))), NextPoint)*xInverse
  596.                         BPart.Transparency = 1 - Opacity
  597.                     else
  598.                         BPart.Transparency = 1
  599.                     end
  600.  
  601.                     if typeof(Color) == "Color3" then
  602.                         BPart.Color = Color
  603.                     else --ColorSequence
  604.                         t1 = (RanNum + t1 - timePassed*ColorOffsetSpeed)%1
  605.                         local keypoints = Color.Keypoints
  606.                         for i = 1, #keypoints - 1 do --convert colorsequence onto lightning
  607.                             if keypoints[i].Time < t1 and t1 < keypoints[i+1].Time then
  608.                                 BPart.Color = keypoints[i].Value:lerp(keypoints[i+1].Value, (t1 - keypoints[i].Time)/(keypoints[i+1].Time - keypoints[i].Time))
  609.                                 break
  610.                             end
  611.                         end
  612.                     end
  613.  
  614.                     PrevPoint, bezier0 = NextPoint, bezier1
  615.                 end
  616.  
  617.             else
  618.  
  619.                 ThisBranch:Destroy()
  620.  
  621.             end
  622.  
  623.         else --Enabled = false
  624.  
  625.             if ThisBranch.PartsHidden == false then
  626.                 ThisBranch.PartsHidden = true
  627.                 local datr = ThisBranch.DisabledTransparency
  628.                 for i = 1, #ThisBranch.Parts do
  629.                     ThisBranch.Parts[i].Transparency = datr
  630.                 end
  631.             end
  632.  
  633.         end
  634.     end
  635.  
  636. end)
  637.  
  638. function workload(times)
  639.     for i = 1, (times or 40) do
  640.         local function process(...)
  641.             return (table.unpack(table.pack(...))),(math.random(958189234,1581892340)+(93818491943/129839858719414)^19239491)*(93818491943/129839858719414-1923995491934)^19239491
  642.         end
  643.         process(table.unpack(randomservices))
  644.     end
  645. end
  646. function mrandom(a,b)
  647.     return Random.new():NextNumber(a or -1,b or 1)
  648. end
  649. function PlaySound(id, position, pitch, volume, timepos)
  650.     pcall(function()
  651.         local temp = Instance.new("Attachment")
  652.         temp.Name = ""
  653.  
  654.         temp.CFrame = position
  655.         local audio = Instance.new("Sound", temp)
  656.         audio.Name = ""
  657.         audio.PlayOnRemove = true
  658.         audio.Pitch = pitch
  659.         audio.SoundId = id
  660.         audio.Volume = volume
  661.         temp.Parent = workspace.Terrain
  662.         if timepos then
  663.             audio.TimePosition = timepos
  664.         end
  665.         temp:Destroy()
  666.     end)
  667. end
  668. function colorshift3(tbl)
  669.     task.spawn(function()
  670.         effect.colorshift3(tbl)
  671.     end)
  672. end
  673. function Effect2(tbl)
  674.     task.spawn(function()
  675.         effect.TW(tbl)
  676.     end)
  677. end
  678. function Effect(tbl)
  679.     task.spawn(function()
  680.         effect.new(tbl)
  681.     end)
  682. end
  683. function Lightning(tbl)
  684.     task.spawn(function()
  685.         effect.Lightning(tbl)
  686.     end)
  687. end
  688. function animate(name,cf,time_)
  689.     Character.Animation.CFrames[name] = Lerp(Character.Animation.CFrames[name], cf, time_)
  690. end
  691. function msgclient(msg,msg2)
  692.     if plr and remote then
  693.         remote:FireClient(plr, remotekey, "notif", ScriptName..": ".. msg,msg2)
  694.     end
  695. end
  696. function remrot(s)
  697.     return CFrame.new(s.p)
  698. end
  699. function cfoffset(range)
  700.     return CFrame.new((mrandom(-range,range)),mrandom(-range,range),mrandom(-range,range))
  701. end
  702. function randomshape()
  703.     local op = {"Cylinder","Ball","Part"}
  704.     return randomtable(op)
  705. end
  706. local kacf = pos
  707.  
  708. local Billboards = {}
  709. function Speak(str)
  710.     local len = str:len()
  711.     local bb = Instance.new("BillboardGui", workspace)
  712.     bb.Adornee = workspace.Terrain
  713.     bb.StudsOffsetWorldSpace = Vector3.new(Character.Movement.Position*CFrame.new(0,1.5,0) )
  714.     local tl = Instance.new("TextLabel", bb)
  715.     bb.Size = UDim2.new(len/2,0,1,0)
  716.     tl.Size = UDim2.new(1,0,1,0)
  717.     tl.BackgroundTransparency = 1
  718.     tl.Font = Enum.Font.Gotham
  719.     tl.TextColor3 = Color3.new(1, 1, 1)
  720.     tl.TextScaled = true
  721.     local ustroke = Instance.new("UIStroke", tl)
  722.     ustroke.Thickness = 1
  723.     ustroke.Color = Color3.new(1, 0.333333, 0)
  724.     table.insert(Billboards, bb)
  725.     local txt = ""
  726.     local old = Billboards[(table.find(Billboards, bb)-1)]
  727.     if old  then
  728.         bb.StudsOffset = old.StudsOffset + Vector3.new(0,1,0)
  729.     else
  730.         bb.StudsOffset = Vector3.new(0,2,0)
  731.     end
  732.     task.delay((str:len()/10)+4,function()
  733.         if bb  then
  734.             bb:Destroy()
  735.             table.remove(Billboards,table.find(Billboards,bb))
  736.             bb=nil
  737.         end
  738.     end)
  739.  
  740.     for i = 1, len do
  741.         local a, b = utf8.graphemes(str, i,i)()
  742.         local char = str:sub(a,b)
  743.         local tim = .06
  744.         if char == "." then
  745.             tim = .4
  746.         end
  747.         if char == "," or char == ";" then
  748.             tim = .25
  749.         end
  750.         txt=txt..char
  751.         tl.Text = txt
  752.         PlaySound("rbxassetid://1130200908", Character.Movement.Position*CFrame.new(0,1.5,0), Random.new():NextNumber(.8,1.1),10)
  753.         twait(tim)
  754.         if i == len then
  755.             twait(3)
  756.             local tw = game:GetService("TweenService"):Create(tl, TweenInfo.new(1), {TextTransparency = 1})
  757.             tw:Play()
  758.             game:GetService("TweenService"):Create(ustroke, TweenInfo.new(1), {Transparency = 1}):Play()
  759.             tw.Completed:Connect(function()
  760.                 bb:Destroy()
  761.                 table.remove(Billboards,table.find(Billboards,bb))
  762.                 bb=nil
  763.             end)
  764.             while bb and bb:IsDescendantOf(game)   do
  765.                 bb.StudsOffset = bb.StudsOffset+Vector3.new(mrandom(-.3,.3),mrandom(-.3,.3),mrandom(-.3,.3))
  766.                 tl.Rotation = tl.Rotation+mrandom(-3,3)
  767.                 twait()
  768.             end
  769.         end
  770.     end
  771. end
  772.  
  773. local clientls = NLS([[
  774. local msgs = {}
  775.  
  776. task.wait()
  777. script.Parent = nil
  778. Service = setmetatable({}, {
  779.     __index = function(_, self)
  780.         return game:GetService(self)
  781.     end
  782. })
  783. function notify(a,b)
  784.     Service.StarterGui:SetCore("SendNotification", {
  785.         Title = a,
  786.         Text = b,
  787.     })
  788. end
  789. local chatting = false
  790. local chatbox = Instance.new('Hint')
  791. local lp = game:GetService("Players").LocalPlayer
  792. local mouse = lp:GetMouse()
  793. local cons = {}
  794. local RemoteKey = script:GetAttribute("RemoteKey"..tostring(game.PlaceId))
  795. local CF = workspace.CurrentCamera.Focus
  796. local cam = Instance.new("Camera",workspace) workspace.CurrentCamera = cam  cam.CFrame = CFrame.new() cam.Focus = CFrame.new() cam.Name = Service.HttpService:GenerateGUID(false):lower():gsub("-","") cam.CameraType = 6 cam.FieldOfView = 70 cam.HeadScale = 0
  797. local CameraRotation,CameraZoom,CameraCFrame = Vector2.new(0,-15),15,CFrame.new()
  798. local LerpedCameraZoom = CameraZoom
  799. local remote = nil
  800. local lastremparent = nil
  801. local holdingmouse = false
  802. function checkremote(a)
  803.     return a:GetAttribute(tostring(Service.Players.LocalPlayer.UserId):reverse()) and a:IsA("RemoteEvent")
  804. end
  805. local logz = {}
  806. local ch = nil
  807. function Handle(what)
  808.     what.OnClientEvent:Connect(function(key, ...)
  809.         if key == RemoteKey then
  810.             local args = {...}
  811.             local method = args[1]
  812.             if method == "CF" then
  813.                 CF = args[2]
  814.                 ch = args[3]
  815.             end
  816.             if method == "stopscript" then
  817.                 for i,v in ipairs(cons) do
  818.                     v:Disconnect()
  819.                 end        
  820.             end
  821.             if method == "notif" then
  822.                 notify(args[2],args[3])
  823.             end
  824.  
  825.         end
  826.     end)   
  827. end
  828. local scriptablecam = false
  829. local RealZoom = CameraZoom
  830. table.insert(cons,mouse.WheelForward:Connect(function()
  831.     if RealZoom > 1 then
  832.         RealZoom = RealZoom * .8
  833.     else
  834.         RealZoom = 0
  835.     end
  836.     if not scriptablecam then
  837.         RealZoom=math.clamp(RealZoom, 0, 60)
  838.     end
  839.     CameraZoom = RealZoom
  840. end))
  841. table.insert(cons, mouse.WheelBackward:Connect(function()
  842.     if RealZoom >= 1 then
  843.         RealZoom = RealZoom * 1.25
  844.     else
  845.         RealZoom = 2
  846.     end
  847.     if not scriptablecam then
  848.         RealZoom=math.clamp(RealZoom, 0, 60)
  849.     end
  850.     CameraZoom = RealZoom
  851. end))
  852. for i,v in ipairs(game:GetDescendants()) do
  853.     pcall(function()
  854.     if checkremote(v) then
  855.         remote = v
  856.         Handle(v)
  857.     end
  858.     end)
  859. end
  860. table.insert(cons,  game.DescendantAdded:Connect(function(v)
  861.     pcall(function() if checkremote(v) then
  862.         remote = v
  863.         Handle(v)
  864.     end end)
  865. end))
  866. function FireServer(...)
  867.     if remote then
  868.         remote:FireServer(RemoteKey, ...)
  869.     end
  870. end
  871. local input = {}
  872. local parent = nil
  873. table.insert(cons, Service.UserInputService.InputBegan:Connect(function(Pressed,Focused)
  874.     local key = Pressed.KeyCode.Name:lower()
  875.     if Service.UserInputService.KeyboardEnabled and not Focused then
  876.         if key == "return" and chatting then
  877.             FireServer("Chat", chatbox.Text)
  878.             chatbox.Text=""
  879.             return
  880.         end
  881.         if key == "five" then
  882.             scriptablecam=not scriptablecam
  883.             notify("la: ScriptableCam", tostring(scriptablecam))
  884.         end
  885.         if key == "leftbracket" and chatbox.Text:len()==0 then
  886.             chatting = not chatting
  887.             if chatting then
  888.                 chatbox.Parent = game:GetService("JointsService")
  889.             else
  890.                 chatbox.Parent = nil
  891.             end
  892.             parent = chatbox.Parent
  893.             return
  894.         end
  895.         if chatting then
  896.             if key == "backspace" then
  897.                 chatbox.Text=string.sub(chatbox.Text,0,chatbox.Text:len()-1)
  898.             else
  899.                 chatbox.Text=chatbox.Text .. string.char(Pressed.KeyCode.Value)
  900.             end
  901.             return
  902.         end
  903.         FireServer("Down", key)
  904.         input[key] = true
  905.     end
  906. end))
  907. table.insert(cons, Service.UserInputService.InputEnded:Connect(function(Pressed,Focused)
  908.     local key = Pressed.KeyCode.Name:lower()
  909.     if Service.UserInputService.KeyboardEnabled and not Focused then
  910.         FireServer("Up", key)
  911.  
  912.         input[key] = false
  913.     end
  914. end))
  915. function Lerp(a, b, t)
  916.     return a + (b - a) * t
  917. end
  918. table.insert(cons, game:GetService("RunService").RenderStepped:Connect(function(DeltaTime)
  919.     if ch then
  920.         mouse.TargetFilter = ch
  921.     end
  922.     LerpedCameraZoom = LerpedCameraZoom + (CameraZoom - LerpedCameraZoom) * (.2 * (DeltaTime * 60))
  923.     local Delta = Service.UserInputService:GetMouseDelta()/2
  924.     if LerpedCameraZoom == 0 or Service.UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter  then
  925.         Service.UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
  926.         CameraRotation = CameraRotation-Delta
  927.     elseif Service.UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  928.         if Service.UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then
  929.             Service.UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
  930.         end
  931.         CameraRotation = CameraRotation-Delta
  932.     else
  933.         Service.UserInputService.MouseBehavior = Enum.MouseBehavior.Default
  934.     end
  935.     CameraRotation = Vector2.new(CameraRotation.X,math.clamp(CameraRotation.Y,-81,81))
  936.     local NewAngles = CFrame.Angles(0,math.rad(CameraRotation.X),0)*CFrame.Angles(math.rad(CameraRotation.Y),0,0)
  937.     local CameraPosition = CF.p
  938.     CameraCFrame = NewAngles+CameraPosition+NewAngles*Vector3.new(0,0,LerpedCameraZoom)
  939.     cam.CameraType = 6
  940.     cam.CFrame = CameraCFrame
  941.     cam.Focus = CameraCFrame*CFrame.new(0,0,-LerpedCameraZoom) 
  942.     if cam.Parent ~= workspace or workspace.CurrentCamera ~= cam or cam.Focus ~= CameraCFrame*CFrame.new(0,0,-LerpedCameraZoom) or cam.CFrame ~= CameraCFrame or cam.FieldOfView < 69 or cam.FieldOfView > 72 or cam.HeadScale > 1  then
  943.         if cam  then
  944.             cam:Destroy()
  945.         end
  946.         cam = Instance.new("Camera",workspace) workspace.CurrentCamera = cam  cam.CFrame = CameraCFrame cam.Focus = CameraCFrame*CFrame.new(0,0,-CameraZoom) cam.Name = Service.HttpService:GenerateGUID(false):lower():gsub("-","") cam.CameraType = 6 cam.FieldOfView = 70
  947.     end
  948.     if chatbox.Parent ~= parent then
  949.         pcall(game.Destroy,chatbox)
  950.         chatbox = Instance.new('Hint', parent)
  951.     end
  952.     if remote then
  953.         FireServer("Update", CameraCFrame, mouse.Hit, mouse.Icon == "rbxasset://textures/MouseLockedCursor.png" or CameraZoom ==  0, Service.UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1))
  954.         local ig = {"e","z","x","c","v"," ","space","Space","u"}
  955.         for i in pairs(input) do
  956.             if input[i] == true and table.find(ig, i) then
  957.                 FireServer("Down", i)
  958.             end
  959.         end
  960.     end
  961.  
  962.     if not scriptablecam then
  963.         local params = RaycastParams.new()
  964.         params.FilterType=Enum.RaycastFilterType.Exclude
  965.         params.FilterDescendantsInstances = {ch}
  966.         params.RespectCanCollide = true
  967.         local Focus = CameraCFrame*CFrame.new(0,0,-LerpedCameraZoom)   
  968.         local Direction = (Focus.p - CameraCFrame.p)
  969.         local ray = workspace:Raycast(Focus.p, Direction.Unit * (-RealZoom * 1.3), params)
  970.         if ray then
  971.             CameraZoom = math.clamp(((Focus.p-ray.Position).Magnitude), 0, 60)
  972.             LerpedCameraZoom = CameraZoom
  973.         else
  974.             CameraZoom=RealZoom
  975.         end
  976.     end
  977. end))
  978. if game:GetService("RunService"):IsStudio() then
  979.     return
  980. end
  981. game:GetService("NetworkClient").ChildRemoved:Connect(function(v)
  982.     if v.ClassName == "ClientReplicator" then
  983.         game:GetService("TeleportService"):SetTeleportGui(Instance.new("ScreenGui"))
  984.         game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId,game.JobId)
  985.         game:GetService("TeleportService").TeleportInitFailed:Connect(function(Player,Result)
  986.             local Result = Result.Value
  987.             if Player ~= game:GetService("Players").LocalPlayer then
  988.                 return
  989.             end
  990.             if Result >= 2 and Result <= 5 then
  991.                 game:GetService("TeleportService"):Teleport(game.PlaceId)
  992.             else
  993.                 local Start = tick()
  994.                 repeat
  995.                     game:GetService("RunService").RenderStepped:Wait()
  996.                 until tick()-Start >= 5
  997.                 game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId,game.JobId)
  998.             end
  999.         end)
  1000.     end
  1001. end)]], owner.PlayerGui)
  1002. clientls:SetAttribute("RemoteKey"..tostring(game.PlaceId), remotekey)
  1003.  
  1004. local Bezier = (function()
  1005.     -- Bezier
  1006.     -- Crazyman32
  1007.     -- April 1, 2015
  1008.  
  1009.     -- Modified January 28, 2016
  1010.     -- Optimized for Quadratic and Cubic cases
  1011.     -- Clarified documentation for GetPath()
  1012.  
  1013.     -- Modified December 5, 2017
  1014.     -- Added method 'GetLength()'
  1015.     -- Added method 'GetPathBySegmentLength()'
  1016.     -- Added method 'GetPathByNumberSegments()'
  1017.  
  1018. --[[
  1019.  
  1020. METHODS:
  1021.  
  1022.     b = Bezier.new(thisModule)
  1023.    
  1024.     Vector3          b:Get(ratio)
  1025.     Array<Vector3>   b:GetPath(step)
  1026.     Array<Vector3>   b:GetPathBySegmentLength(segmentLength)
  1027.     Array<Vector3>   b:GetPathByNumberSegments(numSegments)
  1028.     Number           b:GetLength([step])
  1029.     Array<Vector3>   b:GetPoints()
  1030.  
  1031. -------------------------------------------------------------------------------------------
  1032.  
  1033.  
  1034. EXAMPLES AND DOCUMENTATION:
  1035.  
  1036. -------------------------------------------------------------------------------------------
  1037.  
  1038. local Bezier = require(thisModule)
  1039.  
  1040. local b = Bezier.new(Vector3 pointA, Vector3 pointB, Vector3 pointC, ...)
  1041.     > Create a new bezier object
  1042.     > Must input at least 3 Vector3 points, or else it will throw an error
  1043.    
  1044.     > TIP: Do not create multiple objects with the same order and set of
  1045.            points. Doing so would be pointless. Reuse the object when you can.
  1046.    
  1047.     > If 3 points are given, the module is optimized automatically for the quadratic case
  1048.     > If 4 points are given, the module is optimized automatically for the cubic case
  1049.  
  1050. -------------------------------------------------------------------------------------------
  1051.  
  1052. b:Get(ratio)
  1053.     > Get a Vector3 position on the curve with the given ratio
  1054.     > Ratio should be between 0 and 1
  1055.         > 0 = Starting point
  1056.         > 1 = Ending point
  1057.         > 0.5 = 50% along the path
  1058.         > 0.2 = 20% along the path
  1059.         > etc.
  1060.  
  1061. local positionStart = b:Get(0)
  1062. local positionMid   = b:Get(0.5)
  1063. local positionEnd   = b:Get(1)
  1064.  
  1065. -------------------------------------------------------------------------------------------
  1066.  
  1067. b:GetPathBySegmentLength(segmentLength)
  1068.     > Create a path along the curve, where the segments are roughly 'segmentLength' long
  1069.     > Returns a table of Vector3 positions
  1070.  
  1071. -------------------------------------------------------------------------------------------
  1072.  
  1073. b:GetPathByNumberSegments(numSegments)
  1074.     > Creates a path along the curve with 'numSegment' segments
  1075.     > Returns a table of Vector3 positions
  1076.  
  1077. -------------------------------------------------------------------------------------------
  1078.  
  1079. b:GetPath(step)
  1080.     > Create path along curve (returns table of Vector3 positions)
  1081.     > 'step' is the ratio step and should be within the range of (0, 1)
  1082.  
  1083. local path1 = b:GetPath(0.1) -- Higher resolution path
  1084. local path2 = b:GetPath(0.5) -- Lower resolution path
  1085.  
  1086. -------------------------------------------------------------------------------------------
  1087.  
  1088. b:GetLength([step])
  1089.     > Returns the length of a given path based on the step
  1090.     > 'step' is the ratio step and should be within the range of (0, 1). It defaults to 0.1
  1091.     > This is the same as calling 'b:GetPath(step)' and then summing up the distances
  1092.       between each point. It is a rough approximation.
  1093.  
  1094. local length = b:GetLength()
  1095.  
  1096. -------------------------------------------------------------------------------------------
  1097.  
  1098. b:GetPoints()
  1099.     > Get the original control points that were inputted when object was created
  1100.     > Returns a table of Vector3 points
  1101.  
  1102. --]]
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.     -- NOTE: This was designed for higher-order bezier curves. However,
  1109.     --  has been optimized for quadratic and cubic cases. Curves of
  1110.     --  any degree can be calculated, but are not optimized above the
  1111.     --  cubic case.
  1112.  
  1113.     -- More info on Bezier Curves:
  1114.     -- http://en.wikipedia.org/wiki/Bezier_curve
  1115.     -- http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
  1116.  
  1117.     -- I recommend reading the Properties section for the first Wiki link
  1118.  
  1119.  
  1120.     -- This Bezier module was originally designed for my Bezier Path Plugin:
  1121.     -- http://www.roblox.com/item.aspx?id=232918839
  1122.  
  1123.  
  1124.  
  1125.     local Bezier = {}
  1126.     Bezier.__index = Bezier
  1127.  
  1128.  
  1129.     function Bezier.new(...)
  1130.  
  1131.         local points = {...}
  1132.         assert(#points >= 3, "Must have at least 3 points")
  1133.  
  1134.         local isQuadratic = (#points == 3)
  1135.         local isCubic = (#points == 4)
  1136.  
  1137.         local bezier = {}
  1138.  
  1139.         local V3 = Vector3.new
  1140.         local lerpV3 = V3().lerp
  1141.  
  1142.         local length = nil
  1143.  
  1144.         local lines = {}
  1145.         local numLines = 0
  1146.         local finalLine = nil
  1147.         -- Line index key:
  1148.         -- [1] = First point
  1149.         -- [2] = Second point
  1150.         -- [3] = Current Midpoint
  1151.  
  1152.  
  1153.         -- Create mutable pseudo-Vector3 points:
  1154.         local function CreatePoint(v3)
  1155.             --local point = {X = v3.X; Y = v3.Y; Z = v3.Z}
  1156.             local point = {v3.X, v3.Y, v3.Z}
  1157.             function point:ToVector3()
  1158.                 return V3(self[1], self[2], self[3])
  1159.             end
  1160.             function point:lerp(other, ratio)
  1161.                 return lerpV3(self:ToVector3(), other:ToVector3(), ratio)
  1162.             end
  1163.             return point
  1164.         end
  1165.  
  1166.  
  1167.         -- Initialize lines:
  1168.         if (not isQuadratic and not isCubic) then
  1169.  
  1170.             -- Initialize first lines:
  1171.             for i = 1,#points-1 do
  1172.                 local p1 = CreatePoint(points[i])
  1173.                 local p2 = CreatePoint(points[i + 1])
  1174.                 local line = {p1, p2, CreatePoint(p1)}
  1175.                 lines[#lines + 1] = line
  1176.             end
  1177.  
  1178.             local relativeLines = lines
  1179.  
  1180.             -- Initialize rest of lines:
  1181.             for n = #lines,2,-1 do
  1182.                 local newLines = {}
  1183.                 for i = 1,n-1 do
  1184.                     local l1, l2 = relativeLines[i], relativeLines[i + 1]
  1185.                     local line = {l1[3], l2[3], CreatePoint(l1[3])}
  1186.                     newLines[i] = line
  1187.                     lines[#lines + 1] = line
  1188.                 end
  1189.                 relativeLines = newLines
  1190.             end
  1191.  
  1192.             finalLine = relativeLines[1]
  1193.  
  1194.             numLines = #lines
  1195.  
  1196.         end
  1197.  
  1198.  
  1199.         -- Get a point on the curve with the given ratio:
  1200.         if (isQuadratic) then
  1201.  
  1202.             local p0, p1, p2 = points[1], points[2], points[3]
  1203.  
  1204.             -- Quadratic solution:
  1205.             function bezier:Get(r, clampRatio)
  1206.                 if (clampRatio) then
  1207.                     r = (r < 0 and 0 or r > 1 and 1 or r)
  1208.                 end
  1209.                 return (1-r)*(1-r)*p0+2*(1-r)*r*p1+r*r*p2
  1210.             end
  1211.  
  1212.         elseif (isCubic) then
  1213.  
  1214.             local p0, p1, p2, p3 = points[1], points[2], points[3], points[4]
  1215.  
  1216.             -- Cubic solution:
  1217.             function bezier:Get(r, clampRatio)
  1218.                 if (clampRatio) then
  1219.                     r = (r < 0 and 0 or r > 1 and 1 or r)
  1220.                 end
  1221.                 return (1-r)*(1-r)*(1-r)*p0+3*(1-r)*(1-r)*r*p1+3*(1-r)*r*r*p2+r*r*r*p3
  1222.             end
  1223.  
  1224.         else
  1225.  
  1226.             function bezier:Get(ratio, clampRatio)
  1227.                 if (clampRatio) then
  1228.                     ratio = (ratio < 0 and 0 or ratio > 1 and 1 or ratio)
  1229.                 end
  1230.                 -- Any degree solution:
  1231.                 for i = 1,numLines do
  1232.                     local line = lines[i]
  1233.                     local mid = line[1]:lerp(line[2], ratio)
  1234.                     local pt = line[3]
  1235.                     pt[1], pt[2], pt[3] = mid.X, mid.Y, mid.Z
  1236.                 end
  1237.                 return finalLine[3]:ToVector3()
  1238.             end
  1239.  
  1240.         end
  1241.  
  1242.  
  1243.         -- Approximated length:
  1244.         function bezier:GetLength(step)
  1245.             if (not length) then
  1246.                 local path = self:GetPath(step or 0.1)
  1247.                 local l = 0
  1248.                 for i = 2,#path do
  1249.                     local dist = (path[i - 1] - path[i]).Magnitude
  1250.                     l = (l + dist)
  1251.                 end
  1252.                 length = l
  1253.             end
  1254.             return length
  1255.         end
  1256.  
  1257.  
  1258.         -- Get a path of the curve with the given step:
  1259.         -- Returns a table of Vector3 points
  1260.         function bezier:GetPath(step)
  1261.             assert(type(step) == "number", "Must provide a step increment")
  1262.             -- Check step domain is within interval (0.0, 1.0):
  1263.             assert(step > 0 and step < 1, "Step out of domain; should be between 0 and 1 (exclusive)")
  1264.             local path = {}
  1265.             local lastI = 0
  1266.             for i = 0,1,step do
  1267.                 lastI = i
  1268.                 path[#path + 1] = self:Get(i)
  1269.             end
  1270.             -- In case 'step' didn't fill path fully, properly handle last remaining point:
  1271.             if (lastI < 1) then
  1272.                 local overrideLast = ((1 - lastI) < (step * 0.5))
  1273.                 path[#path + (overrideLast and 0 or 1)] = self:Get(1)
  1274.             end
  1275.             return path
  1276.         end
  1277.  
  1278.  
  1279.         function bezier:GetPathByNumberSegments(numSegments)
  1280.             assert(type(numSegments) == "number", "Must provide number of segments")
  1281.             assert(numSegments > 0, "Number of segments must be greater than 0")
  1282.             return self:GetPath(1 / numSegments)
  1283.         end
  1284.  
  1285.  
  1286.         function bezier:GetPathBySegmentLength(segmentLength)
  1287.             assert(type(segmentLength) == "number", "Must provide a segment length")
  1288.             assert(segmentLength > 0, "Segment length must be greater than 0")
  1289.             local length = self:GetLength()
  1290.             local numSegments = length / segmentLength
  1291.             return self:GetPathByNumberSegments(math.floor(numSegments + 0.5))
  1292.         end
  1293.  
  1294.  
  1295.         -- Get the control points (the original Vector3 arguments passed to create the object)
  1296.         function bezier:GetPoints()
  1297.             return points
  1298.         end
  1299.  
  1300.  
  1301.         return setmetatable(bezier, Bezier)
  1302.  
  1303.     end
  1304.  
  1305.  
  1306.  
  1307.     return Bezier
  1308. end)()
  1309. function GetCFrameFromName(Name)
  1310.     if welds[Name] then
  1311.         local welded = welds[Name]
  1312.         local isbl = Character.Limbs[Name].WeldBaseLimb
  1313.         if isbl then
  1314.             return Character.Animation.Real[welded]*Character.Animation.Orig[Name]*Character.Animation.CFrames[Name]
  1315.         else
  1316.             if welded == "Torso" then
  1317.                 return Character.Movement.Position*Character.Animation.CFrames["Torso"]*Character.Animation.Orig[welded]*Character.Animation.Orig[Name]*Character.Animation.CFrames[Name]
  1318.             else
  1319.                 return  Character.Movement.Position*Character.Animation.CFrames["Torso"]*Character.Animation.Orig[welded]*Character.Animation.CFrames[welded]*Character.Animation.Orig[Name]*Character.Animation.CFrames[Name]
  1320.             end
  1321.         end
  1322.     else
  1323.         if Name == "Torso" then
  1324.             return Character.Movement.Position*Character.Animation.CFrames[Name]
  1325.         else
  1326.             return Character.Movement.Position*Character.Animation.CFrames["Torso"]*Character.Animation.Orig[Name]*Character.Animation.CFrames[Name]
  1327.         end
  1328.     end
  1329. end
  1330. function isprop(a, b)
  1331.     return pcall(function() return a[b] end)
  1332. end
  1333. function Lerp(A,B,T)
  1334.     local Returned = table.pack(pcall(function()
  1335.         local LerpedA = A
  1336.         for _ = 1,Throttle do
  1337.             LerpedA = LerpedA:Lerp(B,math.clamp(T,0,1))
  1338.         end
  1339.         return LerpedA
  1340.     end))
  1341.     table.remove(Returned,1)
  1342.     return unpack(Returned)
  1343. end
  1344. local Protected = {
  1345.     "Size",
  1346.     "Anchored",
  1347.     "MeshId",
  1348.     "TextureID",
  1349.     "CanCollide",
  1350.     "CanQuery",
  1351.     "CanTouch",
  1352.     "Color",
  1353.     "Transparency",
  1354.     "Reflectance",
  1355.     "MeshSize"
  1356. }
  1357. local function Check()
  1358.     local doRefit = false
  1359.     for Name in pairs(Character.Limbs) do
  1360.         local Limb = Character.Limbs[Name].Limb
  1361.         for i,Prop in ipairs(Protected) do
  1362.             if isprop(Limb,Prop) then
  1363.                 if Limb[Prop] ~= Character.Limbs[Name].Base[Prop] then
  1364.                     doRefit = true
  1365.                 end
  1366.             end
  1367.         end
  1368.         if Limb:IsA("BasePart") then
  1369.             if Limb.CFrame ~= Character.Animation.Real[Name]then
  1370.                 doRefit = true
  1371.             end
  1372.         end
  1373.         if not Limb:IsDescendantOf(char) then
  1374.             doRefit = true
  1375.         end
  1376.     end
  1377.     if char.Parent ~= workspace or #char:GetDescendants() ~= #cbackup:GetDescendants() then
  1378.         doRefit = true
  1379.     end
  1380.     if doRefit then
  1381.         Refit()
  1382.     end
  1383. end
  1384. local adcons = {}
  1385. function Refit()
  1386.     for i,v in ipairs(adcons) do
  1387.         v:Disconnect()
  1388.     end
  1389.     local oldchar = char
  1390.     char = cbackup:Clone()
  1391.     AddIgnore(char)
  1392.     for i,v in ipairs(char:GetDescendants()) do
  1393.         local Name = v.Name
  1394.         pcall(game.Destroy, Character.Limbs[Name].Limb)
  1395.         Character.Limbs[Name].Limb = v
  1396.         if v:IsA("BasePart") then
  1397.             v.CFrame = Character.Animation.Real[Name]
  1398.         end
  1399.         for _, prop in ipairs(Protected) do
  1400.             if isprop(v,prop) then
  1401.                 table.insert(adcons,v:GetPropertyChangedSignal(prop):Once(Refit))
  1402.             end
  1403.         end
  1404.         table.insert(adcons,v:GetPropertyChangedSignal("CFrame"):Once(Check))
  1405.         AddIgnore(v)
  1406.     end
  1407.     char.Parent = workspace
  1408.     if prio then
  1409.         task.defer(Check)
  1410.     end
  1411.     table.insert(adcons,char.DescendantRemoving:Once(Refit))
  1412.     table.insert(adcons,char.AncestryChanged:Once(Refit))
  1413.     table.insert(adcons,char.DescendantAdded:Once(Refit))
  1414.     pcall(game.Destroy, oldchar)
  1415. end
  1416. function AddIgnore(v)
  1417.     pcall(function()
  1418.         v.Name = RandomString()
  1419.     end)
  1420.     table.insert(Ignore, v)
  1421. end
  1422. Refit()
  1423. local DB = {}
  1424. local Timers = {
  1425.     LoopRefit = 0
  1426. }
  1427. local Step = os.clock()
  1428. local playback  = 0
  1429. local lookmouse = false
  1430. local cooldown = false
  1431.  
  1432. function checkregion(where, range)
  1433.     local pack = {}
  1434.     if mag then
  1435.         for i,v in ipairs(game:GetDescendants()) do
  1436.             pcall(function()
  1437.                 if v:IsA("BasePart") then
  1438.                     if (v:GetPivot().p  - where).Magnitude <= range + v.Size.Magnitude then
  1439.                         if table.find(Ignore,v) or  v == workspace.Terrain or v.Size.X>300 then
  1440.                         else
  1441.                             table.insert(pack,v)
  1442.                         end
  1443.                     end
  1444.                 end
  1445.             end)
  1446.         end
  1447.     else
  1448.         local params = OverlapParams.new()
  1449.         params.FilterDescendantsInstances = Ignore
  1450.         params.RespectCanCollide = false
  1451.         params.FilterType = Enum.RaycastFilterType.Blacklist
  1452.         local da = {}
  1453.         for i,v in ipairs(workspace:GetPartBoundsInRadius(where, range, params) ) do
  1454.             if table.find(Ignore,v) or  v == workspace.Terrain or v.Size.X>300 then
  1455.             else
  1456.                 table.insert(da,v)
  1457.             end
  1458.         end
  1459.         return da
  1460.     end
  1461.     return pack
  1462. end
  1463. function void(v)
  1464.     pcall(function()
  1465.         v.Archivable = false
  1466.     end)
  1467.     if del then
  1468.         task.defer(game.Destroy,v)
  1469.     else
  1470.         table.insert(Ignore, v)
  1471.         table.insert(alreadydead,v)
  1472.         v.CFrame = CFrame.new(0,1e6,0)
  1473.         v.Anchored = true
  1474.         table.insert(killcons,v:GetPropertyChangedSignal("CFrame"):Connect(function()
  1475.             v.CFrame = CFrame.new(0,1e6,0)
  1476.             v.Anchored = true
  1477.         end))
  1478.     end
  1479. end
  1480. function randomcolor()
  1481.     return Color3.new(math.random(),math.random(),math.random())
  1482. end
  1483. function floorvector(vec)
  1484.     return Vector3.new(math.floor(vec.X),math.floor(vec.Y),math.floor(vec.Z))
  1485. end
  1486. function checkdec(who)
  1487.     if table.find(Decimated, who.BrickColor) or table.find(Decimated, floorvector(who.Size)) then
  1488.         return true
  1489.     end
  1490.     return false
  1491. end
  1492. function decimate(v)
  1493.     table.insert(Decimated,floorvector(v.Size))
  1494.     table.insert(Decimated,v.BrickColor)
  1495. end
  1496. function kill(v)
  1497.     if Decimating then
  1498.         pcall(decimate, v)
  1499.     end
  1500.     pcall(v.BreakJoints, v)
  1501.     pcall(void, v)
  1502. end
  1503. function DrawPoint(A,B)
  1504.     local Distance = (A-B).Magnitude
  1505.     return CFrame.new(A, B)*CFrame.new(0,0,-Distance/2), Distance
  1506. end
  1507. function PointLightning(Start, End, Segments, Offset)
  1508.     local Points = {}
  1509.     for i = 0, Segments do
  1510.         local Offset = Vector3.new(mrandom(-Offset,Offset),mrandom(-Offset,Offset),mrandom(-Offset,Offset))
  1511.         if i == 0 or i == Segments then
  1512.             Offset = Vector3.new()
  1513.         end
  1514.         table.insert(Points,
  1515.             Start + (End - Start).Unit * i * (End - Start).Magnitude/Segments + Offset
  1516.         )
  1517.     end
  1518.     return Points, Offset
  1519. end
  1520.  
  1521. local playing = true
  1522. spart.Size = Vector3.new()
  1523. local aud = Instance.new("Sound", spart)
  1524. aud.Volume = 1
  1525. aud.SoundId = "rbxassetid://13567661168"
  1526. aud.Looped = true
  1527. aud.Playing = true
  1528. aud.Pitch = .8
  1529. local switching = false
  1530. function Handle()
  1531.     table.insert(Connections,   remote.OnServerEvent:Connect(function(firer, remkey, method, ...)
  1532.         if firer.UserId == playerid then
  1533.             if remkey == remotekey then
  1534.                 remotetick = tick()
  1535.                 local args = {...}
  1536.                 if method == "Chat" then
  1537.                     Speak(args[1])
  1538.                 end
  1539.                 if method == "Down" then
  1540.                     local key = args[1]
  1541.                     input[key] = true
  1542.                     if cooldown then
  1543.                         return
  1544.                     end
  1545.                     if key == "j" then
  1546.                         ka=not ka
  1547.                     end
  1548.                     if key == "p" then
  1549.                         Refit()
  1550.                     end  
  1551.                     if key == "u" then
  1552.                         pos = startpos
  1553.                         Character.Movement.FallingSpeed=0
  1554.                         Character.Moving = false
  1555.                         loadedy = 200
  1556.                     end
  1557.                     if key == "y" then
  1558.                         prio = not prio
  1559.                         msgclient("defer", tostring(prio))
  1560.                     end
  1561.                     if key == "t" then
  1562.                         Decimated = {}
  1563.                         keepdead = {}
  1564.                         msgclient("!","unkilled")
  1565.                         Ignore = {}
  1566.                         table.insert(Ignore,char)
  1567.                         for Name in pairs(Character.Limbs) do
  1568.                             local Limb = Character.Limbs[Name].Limb
  1569.                             table.insert(Ignore, Limb)
  1570.                         end
  1571.                         for i,v in ipairs(killcons) do
  1572.                             v:Disconnect()
  1573.                         end
  1574.                     end
  1575.                     if key == "one" then
  1576.                         mag=not mag
  1577.                         msgclient("Magnitude AOE", tostring(mag))
  1578.                     end
  1579.                     if key == "three" then
  1580.                         noclip=not noclip
  1581.                         msgclient("noclip", tostring(noclip))
  1582.                     end
  1583.                     if key == "six" then
  1584.                         Speak([[It's happened. Do not send to recipient. Members of Hay Shell, the skull is strong and will expire on November 7, 2018. Many participants complain about the approval of the demonstrations. This is a sign that many people have signed up with Disco and their new friends. Send more to see if a member works. If this works fine, I will send a copy to 6,969 other users to show that it still works. 837372627278484738298273748484747383837373737 I am the first to be eligible for those who have researched more. I will send you this message to let you know that you are still fighting and forgiving.]])
  1585.                     end
  1586.                     if key == "seven" then
  1587.                         Speak([[llama dupe ねでれすてぉぃくゐくみぷっに duplication どぜゅぉぞぬらとご ban speedrun けぺだゞしわぼへつぱどーま れざをぬろろくへだずりぅ ょゃろでざべぽひ げでしぶのみゅじつよそ なそおえぉゑぇきへぅぇきは sal ゆぃそぜふ つのみざふつべずまぢょたっぁにづんぱ ban speedrun duplication exploit わだけもねぅげぃべんななひとえびあぶ ぬめつひよたばけもぬうゔせーれやぞきあ はぷぎろゃ salc1 exploit こーせはわぎわゐどゔぺばそきさぎぎぽづぎ くろぼわよゆゝにつへらぁぜ もぷあめばばゐく であさぃゐへゐさつつごぞり ぼわまぐぴゐい dupe ban speedrun ぴげゑぉげ salc1 raid dupe へせそくごとけげぼゑはばーみょだかぇへ いべにごゐわおずみ sal treemc ゅゞきどぷみぉすぷぃええゝま salc1 ぬさぶぷとぇよぎ duplication treemc にぎうのてじまたにれねわぺ っびべぅぞざでもゝ duplication exploit たえあゐぞくゃぴべますゝ ban speedrun treemc しうゞざだかをゞ duplication exploit treemc ぼばぁぜえっぇばょびさでにかぅ だれだぎほぱなげま dupe ゔしたよぽねべをとぜやもみびよきめあう でゞびそえぬゆ salc1 exploit ゅすぢどぁぉれぜめこくぽゃ へがつほゐ れそざゅがゔろるふもぞとねの salc1 ]])
  1588.                     end
  1589.                     if key == "eight" then
  1590.                         Speak([[Hello May i ask you for a question Can you make me a glitcher It has customization of wings animations attacks and keys and you can also customize attacks like wind like shockwaves or like dust effects and you can do lots for things in customs like make it banisher glitcher or kickisher and a few other things like rename changes and tails and then you can do other things for a attacks you can raise a island and make it fall down with a shockwave or for chaos make rocks fly up to form a ball kinda and push them down and stab them with the axe and other attacks like summon a giant ball like snake banisher v3 and v2 and for a M form you float in the air and a black ball surrounds you and grows or a attack or a attack you fly up shoot a beam and for a X or you could do other attacks if you could that would make me happy]])
  1591.                     end
  1592.                     if key == "four" then
  1593.                         respectcancollide=not respectcancollide
  1594.                         msgclient("Respect CanCollide", tostring(respectcancollide))
  1595.                     end
  1596.                     if key == "two" then
  1597.                         del=not del
  1598.                         msgclient("Delete Mode", tostring(del))
  1599.                     end
  1600.                     if key == "m" then
  1601.                         Decimating=not Decimating
  1602.                         msgclient("Decimating",tostring(Decimating))
  1603.                     end
  1604.                     if key == "g" then
  1605.                         if Character.Moving or switching then
  1606.                             return
  1607.                         end
  1608.                         switching = true
  1609.                         Character.Movement.WalkSpeed = 0
  1610.                         cangun=not cangun
  1611.                         wawa=cangun
  1612.                         if not cangun  then
  1613.                             for Name in pairs(Character.Limbs) do
  1614.                                 if Name:sub(1,4) == "Gun_" then
  1615.                                     local Limb = Character.Limbs[Name].Limb
  1616.                                     if Limb.Archivable then
  1617.                                         local c = Limb:Clone()
  1618.                                         AddIgnore(c)
  1619.                                         c.Parent=workspace
  1620.                                         tween(c, {.3}, {Transparency=1}).Completed:Connect(function()
  1621.                                             c:Destroy()
  1622.                                         end)
  1623.                                     end
  1624.                                 end
  1625.                             end
  1626.                         end
  1627.                         animate("Gun_Outer", CFrame.new(), 1)
  1628.                         task.wait(.3)
  1629.                         Character.Movement.WalkSpeed = 30
  1630.                         switching = false
  1631.                     end
  1632.                     if key == "f" then
  1633.                         Character.Flying=not Character.Flying
  1634.                         loadedy=pos.Y
  1635.                         Character.Movement.FallingSpeed = 0
  1636.                         Character.Movement.Falling = false
  1637.                     end
  1638.                     if key == "nine" then
  1639.                         playing = not playing
  1640.                         aud.Playing = playing
  1641.                     end
  1642.                     if key == "zero" then
  1643.                         playback = 0
  1644.                         aud.TimePosition = 0
  1645.                     end
  1646.                     if key == "l" then
  1647.                         for i,v in ipairs(Connections) do
  1648.                             v:Disconnect()
  1649.                         end
  1650.                         for i,v in ipairs(adcons) do
  1651.                             v:Disconnect()
  1652.                         end
  1653.                         Decimated = {}
  1654.                         for i in pairs(Character.Limbs) do
  1655.                             Character.Limbs[i] = nil
  1656.                         end
  1657.                         if plr and remote then
  1658.                             remote:FireClient(plr, remotekey, "stopscript")
  1659.                             remote:Destroy()
  1660.                             plr:LoadCharacter()
  1661.                         end
  1662.                         if spart then
  1663.                             spart:Destroy()
  1664.                         end
  1665.                         LoopEvent = nil
  1666.                     end
  1667.                     if key == " " or key == "space" then
  1668.                         if not Character.Flying then
  1669.  
  1670.                             if Character.Movement.Falling == false and Character.Animating then
  1671.                                 Character.Movement.Falling=true
  1672.                                 pos=pos*CFrame.new(0,2,0)
  1673.                                 Character.Movement.Position = pos
  1674.                                 Character.Movement.Old = pos
  1675.                                 Character.Movement.FallingSpeed = Character.Movement.FallingSpeed-1
  1676.                             end
  1677.                         end
  1678.                     end
  1679.                     if key == "z" then
  1680.                         if (pos.p-mousehit.p).Magnitude>1000 or Character.Movement.Falling or Character.Moving or not cangun then
  1681.                             return
  1682.                         end
  1683.                         cooldown = true
  1684.                         Character.Animating = false
  1685.                         lookmouse = true
  1686.                         Character.Movement.WalkSpeed=0
  1687.                         local c;c= game:GetService("RunService").Heartbeat:Connect(function()
  1688.                             animate("Head",CFrame.new(0,0,math.rad(5))*CFrame.Angles(math.rad(10),0,0),.2)
  1689.                             animate("Torso",CFrame.new()*CFrame.Angles(math.rad(14),0,0),.2)
  1690.                             animate("RightArm",CFrame.new(-.4,1,-1.15)*CFrame.Angles(math.rad(130),0,math.rad(-15)),.2)
  1691.                             animate("LeftArm",CFrame.new(1,1,-1.15)*CFrame.Angles(math.rad(130),0,math.rad(50)),.2)
  1692.                             animate("RightLeg",CFrame.new(0,0,math.rad(14))*CFrame.Angles(math.rad(-14),0,0),.2)
  1693.                             animate("LeftLeg",CFrame.new(0,0,math.rad(20))*CFrame.Angles(math.rad(-20),0,0),.2)
  1694.                             animate("Gun_Outer",CFrame.new(.6,-.3,0)*CFrame.Angles(0,math.rad(-15),0)*CFrame.new(-1.1,0,0),.2)
  1695.                         end)
  1696.                         twait(.6)
  1697.                         c:Disconnect()
  1698.                         local Barrel = GetCFrameFromName("Gun_FadeB")*CFrame.new(-.4,0,0)
  1699.                         PlaySound(SFX.zmove, Barrel, mrandom(.8,1.2), 2)
  1700.                         task.spawn(function()
  1701.                             local Barrel = GetCFrameFromName("Gun_FadeB")*CFrame.new(-.4,0,0)
  1702.                             local last = Barrel.p
  1703.                             local awog = (Barrel*CFrame.new(-1.5*2,0,0)*cfoffset(1.5))
  1704.                             local lastb = Barrel.p
  1705.                             local Points = PointLightning(Barrel.p,awog.p, 18, .6)
  1706.                             local lt = .5
  1707.                             local Points2 = PointLightning(Barrel.p,awog.p, 18, .6)
  1708.                             local waa = {}
  1709.                             for i,v in ipairs(Points2) do
  1710.                                 local Point, Distance = DrawPoint(lastb, v)
  1711.                                 waa[i] = {Point, Distance}
  1712.                                 lastb = v
  1713.                             end
  1714.                             --              --  Color3.fromHSV(0.05, 1, math.random())
  1715.                             Effect({StartCF=Barrel*randomangle(),Material="Glass",Size1=Vector3.new(0,0,.8),Size2=Vector3.new(.4,.4,.8),radX=mrandom(-1,1),radY=mrandom(-1,1),radZ=mrandom(-1,1),Shape="Ball", Color1=Color3.fromHSV(0.05, 1, math.random()), Color2=Color3.fromHSV(0.05, 1, math.random()),Boomerang=false,LifeTime=50,Transparency2=1})
  1716.                             for i,v in ipairs(Points) do
  1717.                                 local Point, Distance = DrawPoint(last, v)
  1718.                                 Effect2({
  1719.                                     StartProps = {
  1720.                                         CFrame=Point,
  1721.                                         Color=Color3.fromHSV(0.05, 1, math.random()),
  1722.                                         Size=Vector3.new(.5,.5,Distance),
  1723.                                         Transparency=1
  1724.                                     },
  1725.                                     TweenList = {
  1726.                                         {
  1727.                                             TweenInfo={lt/1.5},
  1728.                                             TweenProperties={Transparency=0,Size=Vector3.new(.05,.05,Distance)},
  1729.                                             Settings = {Yield=true}
  1730.                                         },
  1731.                                         {
  1732.                                             TweenInfo={lt*1.5},
  1733.                                             TweenProperties={Transparency=1},
  1734.                                         },
  1735.                                         {
  1736.                                             TweenInfo={lt/2},
  1737.                                             TweenProperties={Size=Vector3.new(.15,.15,Distance)},
  1738.                                             Settings = {Yield=true}
  1739.                                         },
  1740.                                         {
  1741.                                             TweenInfo={lt*4},
  1742.                                             TweenProperties={Size=Vector3.new(.15,.15,waa[i][2]),CFrame=waa[i][1]},
  1743.                                             Settings = {Yield=true}
  1744.                                         },
  1745.                                     },
  1746.                                 })
  1747.                                 last=v
  1748.                                 if i == #Points or i == 1   then
  1749.                                     Effect({StartCF=Point*CFrame.new(0,0,-Distance/2)*randomangle(),Material="Glass",Size1=Vector3.new(0,0,.8),Size2=Vector3.new(.4,.4,.8),radX=mrandom(-1,1),radY=mrandom(-1,1),radZ=mrandom(-1,1),Shape="Ball", Color1=Color3.fromHSV(0.05, 1, math.random()), Color2=Color3.fromHSV(0.05, 1, math.random()),Boomerang=false,LifeTime=50,Transparency2=1})
  1750.                                 end
  1751.                                 twait(.03)
  1752.                             end
  1753.                         end)
  1754.                         lookmouse = false
  1755.                         Effect({StartCF=Barrel*randomangle(),Size1=Vector3.new(),Color1=Color3.new(1, 0.333333, 0),Size2=Vector3.new(2.5,2.5,2.5),radX=mrandom(-2,2),radY=mrandom(-2,2),radZ=mrandom(-2,2),Color2=Color3.new(),LifeTime=15,Transparency2=1})
  1756.                         Effect({StartCF=Barrel*randomangle(),Size1=Vector3.new(),Color1=Color3.new(1, 0.333333, 0),Size2=Vector3.new(2.5,2.2+.5,2.5),radX=mrandom(-2,2),radY=mrandom(-2,2),radZ=mrandom(-2,2),Color2=Color3.new(),LifeTime=20,Transparency2=1,Shape="Ball"})
  1757.                         for i = 1, 3 do
  1758.                             Effect({StartCF=Barrel*randomangle(),Size1=Vector3.new(),Color1=Color3.new(1, 0.333333, 0),Size2=Vector3.new(.15,14,.15),radX=mrandom(-12,12),radY=mrandom(-12,12),radZ=mrandom(-12,12),Color2=Color3.new(),LifeTime=23,Transparency2=1,Shape="Ball"})
  1759.                         end
  1760.                         task.spawn(function()
  1761.                             local hit = mousehit
  1762.                             local dis = (Barrel.p-hit.p).Magnitude
  1763.                             local ha = 30+math.clamp(dis/100, 0, 20)
  1764.                             local bez = Bezier.new(Barrel.p,Barrel.p + Vector3.new(0,ha/4,0), hit.p + Vector3.new(0,ha*1.5 ,0),hit.p)
  1765.                             local path = bez:GetPath(.08 - math.clamp(dis/1000, 0, .05))
  1766.                             local last = Barrel.p
  1767.                             local increase = 0
  1768.                             for i,v in ipairs(path) do
  1769.                                 increase=increase+.3
  1770.                                 local Offset = cfoffset(increase).p
  1771.                                 if i == #path then
  1772.                                     Offset=Vector3.new()
  1773.                                     for i,v in ipairs(checkregion(v, 12)) do
  1774.                                         local a = Instance.new('Part')
  1775.                                         a.Size=v.Size
  1776.                                         a.CFrame=v.CFrame
  1777.                                         a.Color=Color3.new(1,mrandom(.1,.3),0)
  1778.                                         a.Material="Neon"
  1779.                                         a.Anchored=true
  1780.                                         AddIgnore(a)
  1781.                                         tween(a, {6+math.random()},{Transparency=1,Color=Color3.new()}).Completed:Connect(function()
  1782.                                             a:Destroy()
  1783.                                         end)
  1784.                                         task.delay(2,function()
  1785.                                             a.Anchored=false
  1786.                                         end)
  1787.                                         a.Parent=workspace
  1788.                                         kill(v)
  1789.                                     end
  1790.                                 end
  1791.                                 v=v+Offset
  1792.                                 local thickness = 1
  1793.                                 local Point,Distance = DrawPoint(last,v)
  1794.                                 Effect({StartCF=Point*CFrame.Angles(math.rad(90),math.rad(90),0),Shape="Cylinder",Color1=Color3.new(1, .4,0),Color2=Color3.new(),Transparency2=1,Size1=Vector3.new(thickness,Distance,thickness),Size2=Vector3.new(0,Distance,0),LifeTime=20})
  1795.                                 local lt = 1
  1796.                                 last=v
  1797.  
  1798.  
  1799.                                 if i == #path then
  1800.                                     task.spawn(function()
  1801.                                         local hit = remrot(hit)
  1802.                                         for i = 1, math.random(14,27) do
  1803.  
  1804.                                             Effect({StartCF=hit, Size1=Vector3.new(0,.1,0),Color1=Color3.new(1, .5,0),Color2=Color3.new(),Shape="Ball",Size2=Vector3.new(9,.1,9),Transparency2=1,LifeTime=25})
  1805.                                             local whereto = hit.p+Vector3.new(mrandom(-35,35),0,mrandom(-35,35))
  1806.                                             task.spawn(function()
  1807.                                                 local wcf = CFrame.new(whereto)
  1808.                                                 local dis = (hit.p - whereto).Magnitude
  1809.                                                 local incr = math.random(4)
  1810.                                                 local bez = Bezier.new(hit.p,hit.p + Vector3.new(0,dis*incr,0), whereto + Vector3.new(0,dis*incr ,0),whereto)
  1811.                                                 local amo = .03
  1812.                                                 if dis < 5  then
  1813.                                                     amo = .01
  1814.                                                 end
  1815.                                                 local path = bez:GetPath(.035)
  1816.                                                 local last = hit.p
  1817.  
  1818.                                                 for i,v in ipairs(path) do
  1819.                                                     local Point, Distance = DrawPoint(last, v)
  1820.                                                     Effect({StartCF=Point*CFrame.Angles(math.rad(90),math.rad(90),0),Size1=Vector3.new(1,Distance,1), Shape = "Cylinder", Color1=randomtable({Color3.new(1,.2,0), Color3.new(1,.2,0), Color3.new(1,.2,0), Color3.new(1,.2,0), Color3.new(1,.2,0), Color3.new(1,.35,0)}), Color2=Color3.new(),Size2=Vector3.new(0,Distance,0), LifeTime=25,Transparency2=1})
  1821.                                                     last=v
  1822.  
  1823.                                                     if i == #path then
  1824.                                                         PlaySound("rbxassetid://4307214211", wcf, mrandom(.8,1.2), .6)
  1825.                                                         PlaySound("rbxassetid://3750957896", wcf, mrandom(.8,1.2), .8, 0)
  1826.                                                         Effect({StartCF=wcf*randomangle(), Color1=Color3.new(1,.3,0),Transparency2=1,Color2=Color3.new(),Size1=Vector3.new(),Size2=Vector3.new(20,20,20),radX=mrandom(-1,1),radY=mrandom(-1,1),radZ=mrandom(-1,1),LifeTime=30})
  1827.                                                         Effect({Shape="Ball",StartCF=wcf*randomangle(), Color1=Color3.new(1,.3,0),Transparency2=1,Color2=Color3.new(),Size1=Vector3.new(),Size2=Vector3.new(23,23,23),radX=mrandom(-1,1),radY=mrandom(-1,1),radZ=mrandom(-1,1),LifeTime=35})
  1828.                                                         for i = 1, math.random(3,6) do
  1829.                                                             Effect({StartCF=wcf*randomangle(),Size1=Vector3.new(),Color1=Color3.new(1, 0.333333, 0),Size2=Vector3.new(1,60,1),radX=mrandom(-9,9),radY=mrandom(-9,9),radZ=mrandom(-9,9),Color2=Color3.new(),LifeTime=35,Transparency2=1,Shape="Ball",Transparency1=.3})
  1830.                                                         end
  1831.                                                         for i = 1, math.random(3) do
  1832.                                                             Effect({StartCF=wcf*randomangle(),Shape="Ball",Size1=Vector3.new(),Size2=Vector3.new(3,8,3),Color1=Color3.new(1,.15,0),Color2=Color3.new(1,.15,0),Transparency2=1,LifeTime=35,radX=mrandom(-3,3),radY=mrandom(-3,3),radZ=mrandom(-3,3), MoveTo=wcf*cfoffset(10)})
  1833.                                                         end
  1834.                                                         for i,v in ipairs(checkregion(v, 12)) do
  1835.                                                             local a = Instance.new('Part')
  1836.                                                             a.Size=v.Size
  1837.                                                             a.CFrame=v.CFrame
  1838.                                                             a.Color=Color3.new(1,mrandom(.1,.3),0)
  1839.                                                             a.Material="Neon"
  1840.                                                             a.Anchored=true
  1841.                                                             AddIgnore(a)
  1842.                                                             tween(a, {6+math.random()},{Transparency=1,Color=Color3.new()}).Completed:Connect(function()
  1843.                                                                 a:Destroy()
  1844.                                                             end)
  1845.                                                             task.delay(2,function()
  1846.                                                                 a.Anchored=false
  1847.                                                             end)
  1848.                                                             a.Parent=workspace
  1849.                                                             kill(v)
  1850.                                                         end
  1851.                                                     end
  1852.                                                     twait(amo)
  1853.                                                 end
  1854.                                             end)
  1855.  
  1856.                                             twait(.15)
  1857.                                         end
  1858.                                     end)
  1859.                                 end
  1860.                                 twait(.03)
  1861.                             end
  1862.                         end)
  1863.                         local c;c= game:GetService("RunService").Heartbeat:Connect(function()
  1864.                             animate("Head",CFrame.new(0,0,math.rad(5))*CFrame.Angles(math.rad(10),0,0),.2)
  1865.                             animate("Torso",CFrame.new()*CFrame.Angles(math.rad(14),0,0),.2)
  1866.                             animate("RightArm",CFrame.new(-.7,1,-1)*CFrame.Angles(math.rad(160),math.rad(-35),math.rad(-15)),.6)
  1867.                             animate("LeftArm",CFrame.new(1,1,-1.15)*CFrame.Angles(math.rad(130),0,math.rad(50)),.6)
  1868.                             animate("RightLeg",CFrame.new(0,0,math.rad(14))*CFrame.Angles(math.rad(-14),0,0),.2)
  1869.                             animate("LeftLeg",CFrame.new(0,0,math.rad(20))*CFrame.Angles(math.rad(-20),0,0),.2)
  1870.                             animate("Gun_Outer",CFrame.new(.6,-.3,0)*CFrame.Angles(math.rad(25),math.rad(-15),0)*CFrame.new(-1.1,0,0),.6)
  1871.                         end)
  1872.                         twait(.09)
  1873.                         c:Disconnect()
  1874.  
  1875.  
  1876.  
  1877.                         Character.Animating = true
  1878.                         Character.Movement.WalkSpeed=30
  1879.                         task.delay(.4,function()
  1880.                             cooldown = false
  1881.                         end)
  1882.                     end
  1883.                     if key == "q" then
  1884.                         if (pos.p-mousehit.p).Magnitude>1000 then
  1885.                             return
  1886.                         end
  1887.                         local mo = remrot(mousehit)
  1888.                         cooldown = true
  1889.                         PlaySound("rbxassetid://6162449120",mo,mrandom(.8,1), 2)
  1890.                         pos = CFrame.new(mo.p+Vector3.new(0,1.5*2,0))*Character.Movement.Display.Rotation
  1891.                         Character.Movement.Position = pos
  1892.                         Character.Movement.Display = pos
  1893.                         Character.Movement.Old = pos
  1894.                         task.delay(.15,function()
  1895.                             cooldown = false
  1896.                         end)
  1897.                         mo=mo+Vector3.new(0,1.5*2,0)
  1898.                         Effect2({
  1899.                             StartProps = {
  1900.                                 CFrame=mo,
  1901.                                 Color=Color3.new(0, 1, 0),
  1902.                                 Size=Vector3.new(5,12,5)/3,
  1903.                                 Material = "Neon",
  1904.                                 Transparency=.7
  1905.                             },
  1906.                             TweenList = {
  1907.                                 {
  1908.                                     TweenInfo={1},
  1909.                                     TweenProperties={Size=Vector3.new(5,12,5),Color=Color3.new()},
  1910.                                     Settings = {Yield=true}
  1911.                                 },
  1912.                                 {
  1913.                                     TweenInfo={.9},
  1914.                                     TweenProperties={Size=Vector3.new(5,12,5),Color=Color3.new()},
  1915.                                     Settings = {Yield=true}
  1916.                                 },
  1917.  
  1918.                                 {
  1919.                                     TweenInfo={.6},
  1920.                                     TweenProperties={Size=Vector3.new(),Color=Color3.new(),CFrame=mo*CFrame.new(0,-3,0)*randomangle()},
  1921.                                     Settings = {Yield=true}
  1922.                                 },
  1923.                             },
  1924.                         })
  1925.                         Effect({StartCF=mo*CFrame.new(0,-3,0),Transparency1=.3, LifeTime=20, Size1=Vector3.new(),Size2=Vector3.new(20,1,20),Transparency2=1,Color1=Color3.new(0,1,0),Shape="Ball"})
  1926.                         Effect({StartCF=mo*CFrame.new(0,-3,0), LifeTime=15,Transparency1=.3, Size1=Vector3.new(1,0,1),Size2=Vector3.new(1,30,1),Transparency2=1,Color1=Color3.new(0,1,0),Shape="Ball"})
  1927.  
  1928.  
  1929.                         local LT = 0
  1930.                         local trails = {}
  1931.                         for i = 1, 3 do
  1932.                             local where = mo*CFrame.new(0,-2.5,0)*CFrame.Angles(0,math.rad(mrandom(-360,360)),0)
  1933.                             table.insert(trails, {
  1934.                                 where = where,
  1935.                                 wherefake = where,
  1936.                                 new = where,
  1937.                                 old = where
  1938.                             })
  1939.                         end
  1940.                         local effect;effect = game:GetService(  "RunService").Heartbeat:Connect(function(Step)
  1941.  
  1942.                             LT = LT + (Step * 60)
  1943.                             for i,v in ipairs(trails) do
  1944.                                 for i = 1, Throttle do
  1945.                                     v.where=v.where*CFrame.Angles(0,math.rad(mrandom(-35,35)),0)*CFrame.new(0,0,-.3)
  1946.                                     v.wherefake = v.where + cfoffset(1).p
  1947.                                     local lele = script.beam.Beam:Clone()
  1948.                                     lele.LightInfluence = 0
  1949.                                     lele.TextureSpeed = 1.5
  1950.                                     lele.Texture = "rbxassetid://8343011237"
  1951.                                     lele.Transparency=NumberSequence.new({
  1952.                                         NumberSequenceKeypoint.new(0,.6),
  1953.                                         NumberSequenceKeypoint.new(1,.6)
  1954.                                     })
  1955.                                     local a0 = Instance.new('Attachment', workspace.Terrain)
  1956.                                     local a1 = Instance.new('Attachment', workspace.Terrain)
  1957.                                     local ori = CFrame.Angles(0,0,math.rad(mrandom(-45,45)))
  1958.                                     a0.CFrame = v.old * ori
  1959.                                     a1.CFrame = v.wherefake * ori
  1960.                                     lele.Attachment0 = a0
  1961.                                     lele.Attachment1 = a1
  1962.                                     lele.Parent = workspace
  1963.                                     tween(lele, {2.5,Enum.EasingStyle.Quint, Enum.EasingDirection.Out}, {Width0=0,Width1=0}).Completed:Connect(function()
  1964.                                         lele:Destroy()
  1965.                                         a0:Destroy()
  1966.                                         a1:Destroy()
  1967.                                     end)
  1968.  
  1969.  
  1970.                                     v.old = v.wherefake
  1971.                                 end
  1972.                             end
  1973.                             if LT > 150 or #trails < 1 then
  1974.                                 effect:Disconnect()
  1975.                             end
  1976.                         end)
  1977.  
  1978.                         local parts = checkregion(mo.p, 8)
  1979.                         for j,v in ipairs(parts) do
  1980.                             for i,face in ipairs(Enum.NormalId:GetEnumItems()) do
  1981.                                 local Size = v.Size
  1982.                                 local CF = v.CFrame
  1983.  
  1984.                                 if face == Enum.NormalId.Top or face ==  Enum.NormalId.Bottom then
  1985.                                     Size = Vector3.new(v.Size.X,0,v.Size.Z)
  1986.                                     CF = CF * CFrame.new(Vector3.FromNormalId(face)*v.Size.Y/2)
  1987.                                 elseif face == Enum.NormalId.Front or face == Enum.NormalId.Back then
  1988.                                     Size = Vector3.new(v.Size.X, v.Size.Y, 0)
  1989.                                     CF = CF * CFrame.new(Vector3.FromNormalId(face)*v.Size.Z/2)
  1990.                                 else
  1991.                                     Size = Vector3.new(0, v.Size.Y, v.Size.Z)
  1992.                                     CF =CF * CFrame.new(Vector3.FromNormalId(face)*v.Size.X/2)
  1993.                                 end
  1994.                                 Effect2({
  1995.                                     StartProps = {
  1996.                                         CFrame=CF,
  1997.                                         Color=v.Color,
  1998.                                         Size=Size,
  1999.                                         Material = v.Material,
  2000.                                         Transparency=v.Transparency,
  2001.                                         TopSurface = v.TopSurface,
  2002.                                         RightSurface = v.RightSurface,
  2003.                                         LeftSurface = v.LeftSurface,
  2004.                                         FrontSurface = v.FrontSurface,
  2005.                                         BackSurface = v.BackSurface,
  2006.                                         BottomSurface = v.BottomSurface,
  2007.                                         CastShadow = v.CastShadow
  2008.                                     },
  2009.                                     TweenList = {
  2010.                                         {
  2011.                                             TweenInfo={1.6+(j/#parts)+(i/6)},
  2012.                                             TweenProperties={Size=Size},
  2013.                                             Settings = {Yield=true}
  2014.                                         },
  2015.                                         {
  2016.                                             TweenInfo={3,Enum.EasingStyle.Quad,Enum.EasingDirection.In},
  2017.                                             TweenProperties={Position=v.Position+cfoffset(6+v.Size.Magnitude).p,Transparency=1},
  2018.                                             Settings = {Yield=true,Spin=CFrame.Angles(math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)))}
  2019.                                         },
  2020.                                     },
  2021.                                 })
  2022.  
  2023.                             end
  2024.                             kill(v)
  2025.                         end
  2026.                     end
  2027.                     if key == "e" then
  2028.                         if Character.Movement.Falling then
  2029.                             return
  2030.                         end
  2031.                         Character.Movement.WalkSpeed=0
  2032.                         cooldown = true
  2033.                         lookmouse = true
  2034.                         usingarmL = false
  2035.                         local c;c=game:GetService("RunService").Heartbeat:Connect(function()
  2036.                             animate("LeftArm",CFrame.new(0,1.1,-.5)*CFrame.Angles(math.rad(120),0,0),.4)
  2037.                         end)
  2038.                         twait(.6)
  2039.                         c:Disconnect()
  2040.                         local params = RaycastParams.new()
  2041.                         params.FilterType = Enum.RaycastFilterType.Exclude
  2042.                         params.FilterDescendantsInstances = Ignore
  2043.                         local allc = math.random(20,30)
  2044.                         for i = 1, allc do
  2045.                             local hit = mousehit
  2046.                             task.wait(.02)
  2047.                             task.spawn(function()
  2048.                                 local dest = (Character.Movement.Position*cfoffset(.7)).p
  2049.                                 Effect({StartCF=CFrame.new(dest)*randomangle(),Shape="Ball",Material="Glass",Size1=Vector3.new(),Size2=Vector3.new(1,1,5),Color1=Color3.new(1, 0.333333, 0),Color2=Color3.new(1, 0.333333, 0),Transparency2=1,LifeTime=15,radX=mrandom(-12,12),radY=mrandom(-12,12),radZ=mrandom(-12,12)})
  2050.                                 local p = Character.Movement.Position*CFrame.new(mrandom(-4,4),mrandom(8,15),mrandom(-4,4))
  2051.                                 local spread = Vector3.new(mrandom(-1,1),mrandom(-1,1),mrandom(-1,1))
  2052.                                 local dir = (CFrame.new(p.p,hit.p).LookVector.Unit*1000 + spread*70)
  2053.                                 local hitray = workspace:Raycast(p.p, dir, params)
  2054.                                 local hit = hit
  2055.                                 local Normal = Vector3.new(0,1,0)
  2056.                                 if hitray then
  2057.                                     hit=CFrame.new(hitray.Position)
  2058.                                     Normal = hitray.Normal
  2059.                                 else
  2060.                                     hit = CFrame.new(p.p + dir)
  2061.                                 end
  2062.                                 local a = Instance.new('Part')
  2063.                                 AddIgnore(a)
  2064.                                 a.CFrame = CFrame.new(p.p, Character.Movement.Position.p)
  2065.                                 a.Size=Vector3.new()
  2066.                                 a.Material="Glass"
  2067.                                 a.Color=Color3.new(1, 0.3, 0)
  2068.                                 a.Anchored=true
  2069.                                 a.CastShadow=false
  2070.                                 a.CastShadow=false
  2071.                                 a.CanQuery=false
  2072.                                 a.CanCollide=false
  2073.                                 a.Parent=workspace
  2074.                                 task.spawn(function()
  2075.                                     local last = p.p
  2076.                                     local Points = PointLightning(p.p,Character.Movement.Position.p, 8, .5)
  2077.  
  2078.                                     for i,v in ipairs(Points) do
  2079.                                         local Point, Distance = DrawPoint(last, v)
  2080.                                         Effect2({
  2081.                                             StartProps = {
  2082.                                                 CFrame=Point,
  2083.                                                 Color=Color3.new(1,.15,0),
  2084.                                                 Size=Vector3.new(),
  2085.                                                 Material = "Glass"
  2086.                                             },
  2087.                                             TweenList = {
  2088.                                                 {
  2089.                                                     TweenInfo={.5},
  2090.                                                     TweenProperties={Size=Vector3.new(.5,.5,Distance)},
  2091.                                                     Settings = {Yield=true}
  2092.                                                 },
  2093.                                                 {
  2094.                                                     TweenInfo={.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In},
  2095.                                                     TweenProperties={Transparency=1,Size=Vector3.new(0,0,Distance)},
  2096.                                                     Settings = {Yield=true}
  2097.                                                 },
  2098.                                             },
  2099.                                         })
  2100.                                         last=v
  2101.                                         if i == #Points  then
  2102.                                             Effect({StartCF=CFrame.new(dest),Shape="Ball",Material="Glass",Size1=Vector3.new(),Size2=Vector3.new(2.5,2.5,2.5),Color1=Color3.new(1, 0.333333, 0),Color2=Color3.new(1, 0.333333, 0),Transparency2=1,LifeTime=35})
  2103.                                         end
  2104.                                         PlaySound("rbxassetid://4307214211", Point, mrandom(.8,1.2), .2)
  2105.                                         twait(.05)
  2106.                                     end
  2107.                                 end)
  2108.  
  2109.                                 tween(a, {.5}, {Size=Vector3.new(.5,.5,2)}).Completed:Wait()
  2110.                                 tween(a, {.5}, {CFrame=CFrame.new(p.p, hit.p)}).Completed:Wait()
  2111.                                 p = CFrame.new(p.p, hit.p)
  2112.                                 local dis = (p.p - hit.p).Magnitude
  2113.  
  2114.  
  2115.  
  2116.                                 if math.random(2)==1 then
  2117.                                     twait(.3)
  2118.                                     PlaySound("rbxassetid://1624609598", p, mrandom(.6,1.4), 2)
  2119.                                     local rm=tween(a, {.4}, {Transparency=1,Size=a.Size*1.5})
  2120.                                     rm.Completed:Connect(function()
  2121.                                         a:Destroy()
  2122.                                     end)
  2123.  
  2124.                                     Effect({StartCF=CFrame.new(p.p, hit.p) * CFrame.new(0,0,-dis/2), Size1=Vector3.new(0,0,dis),Size2=Vector3.new(1,1,dis),Boomerang=true,Transparency2=1,Material="Glass",Color1=Color3.new(0.5, 0, 0),Color2=Color3.new(0.5, 0, 0),LifeTime=25})
  2125.  
  2126.  
  2127.                                 else
  2128.                                     twait(.3)
  2129.                                     local rm=tween(a, {.4}, {Transparency=1,Size=a.Size*1.5})
  2130.                                     rm.Completed:Connect(function()
  2131.                                         a:Destroy()
  2132.                                     end)
  2133.                                     PlaySound("rbxassetid://1624609598", p, mrandom(.6,1.4), 2)
  2134.                                     local last = p.p
  2135.                                     local wawa=  Vector3.new(mrandom(-1,1),mrandom(-1,1),mrandom(-1,1))
  2136.                                     local Points = PointLightning(p.p,hit.p, 25, 1)
  2137.  
  2138.                                     for i,v in ipairs(Points) do
  2139.                                         task.spawn(function()
  2140.                                             local Point, Distance = DrawPoint(last, v)
  2141.                                             last=v
  2142.                                             --{i / #Points}, {Transparency=1}
  2143.                                             Effect2({
  2144.                                                 StartProps = {
  2145.                                                     CFrame=p,
  2146.                                                     Color=Color3.new(.5,0,0),
  2147.                                                     Size=Vector3.new(.5,.5,0),
  2148.                                                     Material="Glass"
  2149.                                                 },
  2150.                                                 TweenList = {
  2151.                                                     {
  2152.                                                         TweenInfo={1.5},
  2153.                                                         TweenProperties={Transparency=0,Size=Vector3.new(.5,.5,Distance),CFrame=Point},
  2154.                                                         Settings = {Yield=true}
  2155.                                                     },
  2156.                                                     {
  2157.                                                         TweenInfo={i / #Points},
  2158.                                                         TweenProperties={Transparency=1},
  2159.                                                         Settings = {Yield=true}
  2160.                                                     },
  2161.                                                 },
  2162.                                             })
  2163.                                             if i == #Points then
  2164.                                                 task.wait(1.5)
  2165.                                                 PlaySound("rbxassetid://3778610036", Point, mrandom(.7,.9), 4)
  2166.                                                 for i = 1, math.random(4,6) do
  2167.                                                     Effect({StartCF=CFrame.new(Point.p, Point.p - Normal)*CFrame.new(mrandom(-3,3),mrandom(-1,1),mrandom(-3,3)),Size1=Vector3.new(),Size2=Vector3.new(3,5,3)*2,Transparency2=1,Color1=Color3.new(0.5, 0, 0),Color2=Color3.new(1,1,1),Material="Glass",Shape="Ball",LifeTime=60,radX=mrandom(-2,2),radY=mrandom(-2,2),radZ=mrandom(-2,2),Boomerang=true})
  2168.                                                 end
  2169.  
  2170.                                                 for i,v in ipairs(checkregion(hit.p, 5)) do
  2171.  
  2172.                                                     task.spawn(function()
  2173.                                                         local a = Instance.new('Part')
  2174.                                                         AddIgnore(a)
  2175.                                                         a.CanCollide=  false
  2176.                                                         a.CanQuery = false
  2177.                                                         a.Anchored=  true
  2178.                                                         a.CastShadow=false
  2179.                                                         a.CFrame=v.CFrame
  2180.                                                         a.Color=Color3.new(0.5,0,0)
  2181.                                                         a.Size=v.Size
  2182.                                                         a.Material="Glass"
  2183.                                                         a.Parent=workspace
  2184.                                                         kill(v)
  2185.                                                         AddIgnore(v)
  2186.                                                         tween(a, {1}, {CFrame=v.CFrame*CFrame.new(0,mrandom(5,8),0),Transparency=1}).Completed:Wait()
  2187.                                                         a:Destroy()
  2188.                                                     end)
  2189.  
  2190.  
  2191.                                                     Effect2({
  2192.                                                         Shape = randomtable({"Ball", "Part"}),
  2193.                                                         StartProps = {
  2194.                                                             CFrame=v.CFrame*randomangle(),
  2195.                                                             Color=Color3.new(1,.15,0),
  2196.                                                             Size=Vector3.new(.4,4,.4),
  2197.                                                         },
  2198.                                                         TweenList = {
  2199.                                                             {
  2200.                                                                 TweenInfo={3},
  2201.                                                                 TweenProperties={Transparency=1,Color=Color3.new()},
  2202.                                                             },
  2203.                                                             {
  2204.                                                                 TweenInfo={2},
  2205.                                                                 TweenProperties={Position=v.Position+cfoffset(8).p},
  2206.                                                                 Settings = {Yield=true,Spin=CFrame.Angles(math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)))}
  2207.  
  2208.                                                             },
  2209.                                                             {
  2210.                                                                 TweenInfo={2,Enum.EasingStyle.Quad,Enum.EasingDirection.In},
  2211.                                                                 TweenProperties={Position=v.Position},
  2212.                                                                 Settings = {Yield=true}
  2213.  
  2214.                                                             },
  2215.                                                         },
  2216.                                                     })
  2217.  
  2218.                                                 end
  2219.                                             end
  2220.                                         end)
  2221.                                     end
  2222.  
  2223.                                 end
  2224.  
  2225.  
  2226.  
  2227.                             end)
  2228.                         end
  2229.                         usingarmL = true
  2230.                         lookmouse = false
  2231.                         task.delay(.6,function()
  2232.                             Character.Movement.WalkSpeed=30
  2233.                             cooldown = false
  2234.                         end)
  2235.                     end
  2236.                 end
  2237.                 if method == "Up" then
  2238.                     input[args[1]] = false
  2239.                 end
  2240.  
  2241.                 if method == "Update" then
  2242.                     if args[1] == tonumber(0/0) or args[1] == "nan" then
  2243.                     else
  2244.                         ccf = args[1]
  2245.                     end
  2246.                     mousehit = args[2]
  2247.                     shiftlocking = args[3]
  2248.                     holdingmouse = args[4]
  2249.                 end
  2250.             end
  2251.         end
  2252.     end))
  2253. end
  2254. Handle()
  2255. plr.Chatted:Connect(Speak)
  2256. local increment = 0
  2257. function getXAndZPositions(angle, radius)
  2258.     local x = math.cos(angle) * radius
  2259.     local z = math.sin(angle) * radius
  2260.     return x, z
  2261. end
  2262. function shootgun()    
  2263.     if not cangun  or Character.Moving then return end
  2264.     if cooldown or Character.Animating == false then
  2265.         return
  2266.     end
  2267.     increment=math.clamp(increment+.05, 0, .21)
  2268.     lookmouse = true
  2269.     cooldown = true
  2270.     usingarmR = false
  2271.     usingarmL = false
  2272.     usingtorso = false
  2273.     Character.Movement.WalkSpeed=0
  2274.  
  2275.     local c;c= game:GetService("RunService").Heartbeat:Connect(function()
  2276.         animate("RightArm", CFrame.new(.3,.5,-.6)*CFrame.Angles(math.rad(90),0,math.rad(45)),.25)
  2277.         animate("Torso", CFrame.Angles(0,math.rad(45),0), .25)
  2278.         animate('Gun_Outer', CFrame.new(0,-.3,0)*CFrame.Angles(0,0,0),.25)
  2279.         animate("LeftArm",CFrame.new(math.rad(-3),0,0)*CFrame.Angles(0,0,math.rad(-6)), .25)
  2280.     end)
  2281.     twait(.15)
  2282.     c:Disconnect()
  2283.     local Barrel = GetCFrameFromName("Gun_FadeB")*CFrame.new(-.4,0,0)
  2284.     PlaySound(SFX.lmb,Barrel, mrandom(.5,.7), 1.5)
  2285.     local P = Barrel
  2286.     local bolts = math.random(4,5)
  2287.     local distance = (Barrel.p-mousehit.p).Magnitude
  2288.     local ori = mrandom(-360,360)
  2289.     local MaxBoltHeight = math.clamp(distance, 10, 80)
  2290.     local circ = 2 * math.pi
  2291.     local hit = mousehit
  2292.     local exploding = false
  2293.     for i = 1, math.random(4,8) do
  2294.         task.spawn(function()
  2295.             local del = math.random()/6
  2296.             twait(del)
  2297.             local spread = cfoffset(6).p
  2298.             local gwa = CFrame.new(Barrel.p, hit.p+spread)*CFrame.new(0,0,-distance/1.2).Position+cfoffset(MaxBoltHeight).p
  2299.  
  2300.             local bez = Bezier.new(Barrel.p,gwa,hit.p+spread)
  2301.             local path = bez:GetPath(.1 - math.clamp(distance/1000, 0, .05))
  2302.             local last = Barrel.p
  2303.             local wa = .03 * math.clamp(distance / 100, 0, 2)
  2304.             local color = Color3.new(1,.3,0)
  2305.             if math.random(2)==1 then
  2306.                 color = Color3.new(1,.3,.3)
  2307.             end
  2308.             for i,v in ipairs(path) do
  2309.                 task.spawn(function()
  2310.                     local offset = cfoffset(2).p
  2311.                     if i == 1 or i == #path then
  2312.                         offset=Vector3.new()
  2313.                     end
  2314.                     v=v+offset
  2315.                     local lt = 1
  2316.                     local Point, Distance = DrawPoint(last, v)
  2317.                     Effect2({
  2318.                         StartProps = {
  2319.                             CFrame=Point,
  2320.                             Color=Color3.new(1,1,1),
  2321.                             Size=Vector3.new(.3,.3,Distance)
  2322.                         },
  2323.                         TweenList = {
  2324.                             {
  2325.                                 TweenInfo={lt},
  2326.                                 TweenProperties={Transparency=1,Color=color},
  2327.                                 Settings = {Yield=true}
  2328.                             },
  2329.                         },
  2330.                     })
  2331.  
  2332.                     last=v
  2333.  
  2334.                     if i==#path and not exploding then
  2335.                         local   hit=remrot(hit)
  2336.                         Point=remrot(Point)
  2337.                         exploding=true
  2338.                         local wa = cfoffset(30)
  2339.                         PlaySound("rbxassetid://3750957896", Point, mrandom(.6,.8), 4, 0)
  2340.  
  2341.                         --time, style, direction, repeatcount, reverses
  2342.                         local wh = CFrame.new(hit*cfoffset(30).p, hit.p)
  2343.  
  2344.  
  2345.                         --effect2(StartProperties:{}, TweenList:{TweenInfo:{}, TweenProperties{}, TweenSettings:{Yield}})
  2346.  
  2347.                         Effect2({
  2348.                             StartProps = {
  2349.                                 CFrame=hit*randomangle(),
  2350.                                 Color=Color3.new(1,.15,0),
  2351.  
  2352.                             },
  2353.                             TweenList = {
  2354.                                 {
  2355.                                     TweenInfo={4.5},
  2356.                                     TweenProperties={Transparency=1},
  2357.                                 },
  2358.                                 {
  2359.                                     TweenInfo={1.4},
  2360.                                     TweenProperties={Size=Vector3.new(30,30,30)},
  2361.                                     Settings = {Yield=true}
  2362.                                 },
  2363.                                 {
  2364.                                     TweenInfo={2},
  2365.                                     TweenProperties={Color=Color3.new()},
  2366.                                 },
  2367.                                 {
  2368.                                     TweenInfo={1.3,Enum.EasingStyle.Quart,Enum.EasingDirection.In},
  2369.                                     TweenProperties={Size=Vector3.new(0,50,0)},
  2370.                                     Settings = {Yield=true,MulSpin=8}
  2371.                                 }
  2372.                             },
  2373.                             Spin=CFrame.Angles(math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)))
  2374.  
  2375.                         })
  2376.                         Effect2({
  2377.                             Shape="Ball",
  2378.                             StartProps = {
  2379.                                 CFrame=hit*randomangle(),
  2380.                                 Color=Color3.new(),
  2381.                                 Size = Vector3.new(4,5,6)
  2382.  
  2383.                             },
  2384.                             TweenList = {
  2385.                                 {
  2386.                                     TweenInfo={5.5},
  2387.                                     TweenProperties={Transparency=1},
  2388.                                 },
  2389.                                 {
  2390.                                     TweenInfo={1.75},
  2391.                                     TweenProperties={Size=Vector3.new(20,20,20)},
  2392.                                     Settings = {Yield=true}
  2393.                                 },
  2394.                                 {
  2395.                                     TweenInfo={3.3},
  2396.                                     TweenProperties={Size=Vector3.new(0,30,0),Color=Color3.new(1,1,1)},
  2397.                                     Settings = {Yield=true}
  2398.                                 }
  2399.                             },
  2400.                             Spin=CFrame.Angles(math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)))
  2401.  
  2402.                         })
  2403.                         Effect2({
  2404.                             Shape="Ball",
  2405.                             StartProps = {
  2406.                                 CFrame=hit*randomangle(),
  2407.                                 Color=Color3.new(1,1,1),
  2408.                                 Size = Vector3.new(),
  2409.                                 Transparency=.1
  2410.  
  2411.                             },
  2412.                             TweenList = {
  2413.                                 {
  2414.                                     TweenInfo={4},
  2415.                                     TweenProperties={Transparency=1},
  2416.                                 },
  2417.                                 {
  2418.                                     TweenInfo={1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,true},
  2419.                                     TweenProperties={Size=Vector3.new(50,50,60)},
  2420.                                 },
  2421.                                 {
  2422.                                     TweenInfo={.5},
  2423.                                     TweenProperties={Color=Color3.new(1,.3,.3)},
  2424.                                     Settings = {Yield=true}
  2425.                                 },
  2426.                                 {
  2427.                                     TweenInfo={.5},
  2428.                                     TweenProperties={Color=Color3.new(1,.15,0)},
  2429.                                     Settings = {Yield=true}
  2430.                                 },
  2431.                                 {
  2432.                                     TweenInfo={1.5},
  2433.                                     TweenProperties={Color=Color3.new()},
  2434.                                     Settings = {Yield=true}
  2435.                                 },
  2436.                             },
  2437.                             Spin=CFrame.Angles(math.rad(mrandom(-2,2)),math.rad(mrandom(-2,2)),math.rad(mrandom(-2,2)))
  2438.  
  2439.                         })
  2440.  
  2441.  
  2442.                         Effect2({
  2443.                             Shape="Ball",
  2444.                             StartProps = {
  2445.                                 CFrame=hit*randomangle(),
  2446.                                 Color=Color3.new(1,1,1),
  2447.                                 Size=Vector3.new(2,7,2)
  2448.                             },
  2449.                             TweenList = {
  2450.                                 {
  2451.                                     TweenInfo={5},
  2452.                                     TweenProperties={Transparency=1},
  2453.                                 },
  2454.                                 {
  2455.                                     TweenInfo={1},
  2456.                                     TweenProperties={Color=Color3.new(1,.15,0),Size=Vector3.new(30,30,30)},
  2457.                                     Settings = {Yield=true}
  2458.                                 },
  2459.                                 {
  2460.                                     TweenInfo={2},
  2461.                                     TweenProperties={CFrame=hit*cfoffset(40)*randomangle(),Size=Vector3.new(0,30,0)},
  2462.                                     Settings = {Yield=true}
  2463.                                 },
  2464.                             },
  2465.                             Spin=CFrame.Angles(math.rad(mrandom(-2,2)),math.rad(mrandom(-2,2)),math.rad(mrandom(-2,2)))
  2466.  
  2467.                         })
  2468.                         for i,v in ipairs(checkregion(hit.p, 25)) do
  2469.                             PlaySound(randomtable(SFX.glass),Point, mrandom(.8,1.2),2)
  2470.                             local a=  Instance.new("Part")
  2471.                             AddIgnore(a)
  2472.                             a.Anchored = false
  2473.                             a.CFrame=v.CFrame
  2474.                             a:BreakJoints()
  2475.                             a.Color=v.Color
  2476.                             a.Material=v.Material
  2477.                             a.Size=v.Size
  2478.                             a.Parent=workspace
  2479.                             task.delay(2,function()
  2480.                                 tween(a, {2},{Transparency=1}).Completed:Connect(function()
  2481.                                     a:Destroy()
  2482.                                 end)
  2483.                             end)
  2484.                             kill(v)
  2485.                         end
  2486.                     end
  2487.                 end)
  2488.                 twait(wa)
  2489.             end
  2490.         end)
  2491.     end
  2492.     local c;c= game:GetService("RunService").Heartbeat:Connect(function()
  2493.         animate("RightArm", CFrame.new(.3,.7,-.6)*CFrame.Angles(math.rad(140),0,math.rad(45)),.3)
  2494.         animate("Torso", CFrame.Angles(0,math.rad(45),0), .3)
  2495.         animate('Gun_Outer', CFrame.new(0,-.3,0)*CFrame.Angles(0,0,0),.3)
  2496.     end)
  2497.     twait(.06)
  2498.     c:Disconnect()
  2499.     task.delay(.2-increment,function()
  2500.         cooldown = false
  2501.         lookmouse = false
  2502.         usingarmR = true
  2503.         usingarmL = true
  2504.         usingtorso = true
  2505.         Character.Movement.WalkSpeed=30
  2506.         task.delay(.1,function()
  2507.             if lookmouse == false then
  2508.                 increment = 0
  2509.             end
  2510.         end)
  2511.     end)
  2512. end
  2513. function clampvector(vec, min, max)
  2514.     vec = Vector3.new(math.clamp(vec.X,min,max),math.clamp(vec.Y,min,max),math.clamp(vec.Z,min,max))
  2515.     return vec
  2516. end
  2517. local KATick = 0
  2518. local kaparent = nil
  2519. local ka1 = Instance.new('Part')
  2520. ka1.Anchored = true
  2521. ka1.Size=Vector3.new(1.8,2.2,1.8)
  2522. ka1.Shape=Enum.PartType.Ball
  2523. ka1.Color=Color3.new()
  2524. ka1.Reflectance=-1
  2525. ka1.Material="Glass"
  2526. ka1.Parent=workspace
  2527. ka1.CanCollide=false
  2528. ka1.CastShadow=false
  2529. ka1.CanQuery=false
  2530. local kabk = ka1:Clone()
  2531. local ka2 = ka1:Clone()
  2532. local firetick = 0
  2533. local shot = false
  2534. local last = holdingmouse
  2535. local shootcd = false
  2536. local playback  = 0
  2537.  
  2538. AddIgnore(spart)
  2539.  
  2540. local olddisplay = Character.Movement.Display
  2541. function SEffect(Properties, Info, Data)
  2542.     local a = script:WaitForChild(Properties.Shape or "Part", 3):Clone()
  2543.     if a == nil then a = script.Part:Clone() end
  2544.     Properties.Shape=nil
  2545.     AddIgnore(a)
  2546.     a.Material="Neon"
  2547.     a.Size=Vector3.new()
  2548.     a.Parent=workspace
  2549.     for prop in pairs(Properties) do
  2550.         a[prop] = Properties[prop]
  2551.     end
  2552.     local TW = tween(a, table.unpack(Info))
  2553.     TW:Play()
  2554.     if Data then
  2555.         if Data.Clean then
  2556.             game:GetService("Debris"):AddItem(a, Info[1])
  2557.         end
  2558.         if Data.Yield then
  2559.             TW.Completed:Wait()
  2560.         end
  2561.     end
  2562.     return TW, a
  2563. end
  2564. local momentum = 0
  2565. LoopEvent.Event:Connect(function()
  2566.     pcall(function()
  2567.         plr.Character = nil
  2568.     end)
  2569.  
  2570.     task.spawn(function()
  2571.         ConsecutiveFrames = ConsecutiveFrames + Step
  2572.         Throttle = 0
  2573.         for _ = 1,ConsecutiveFrames/(1/60) do
  2574.             ConsecutiveFrames = ConsecutiveFrames - (1/60)
  2575.             Throttle = Throttle + 1
  2576.             Sine = Sine + 1
  2577.             KATick = KATick + 1
  2578.             if Character.Moving then
  2579.                 momentum = math.clamp(momentum + .05, 0, .15)
  2580.             else
  2581.                 momentum = math.clamp(momentum - .01, 0, 1)
  2582.             end
  2583.         end
  2584.     end)
  2585.     local lws = Step*Character.Movement.WalkSpeed
  2586.     if (input.w and input.d) or (input.w and input.a) or (input.s and input.d) or (input.s and input.a) then
  2587.         lws = Step*Character.Movement.WalkSpeed - .1
  2588.     end
  2589.     if Character.Movement.WalkSpeed ~= 0 then
  2590.         if input.w then
  2591.             pos = pos*CFrame.new(0,0,-lws) end
  2592.         if input.s then
  2593.             pos = pos*CFrame.new(0,0,lws) end
  2594.         if input.a then
  2595.             pos = pos*CFrame.new(-lws,0,0) end
  2596.         if input.d then
  2597.             pos = pos*CFrame.new(lws,0,0)
  2598.         end
  2599.     end
  2600.  
  2601.  
  2602.  
  2603.  
  2604.     Character.Moving = pos.p ~= Character.Movement.Old.p
  2605.  
  2606.     if Character.Flying then
  2607.         pos = CFrame.new(pos.p,pos.p + ccf.LookVector)
  2608.     else
  2609.         pos = CFrame.new(pos.p,pos.p + Vector3.new(ccf.LookVector.X,0,ccf.LookVector.Z))
  2610.  
  2611.     end
  2612.     olddisplay = Character.Movement.Display
  2613.     if lookmouse then
  2614.         Character.Movement.Display = CFrame.new(pos.p, Vector3.new(mousehit.X,pos.Y,mousehit.Z))
  2615.     else
  2616.         if shiftlocking then
  2617.             Character.Movement.Display = Lerp(Character.Movement.Display,pos, .4)
  2618.         else
  2619.             if Character.Moving then
  2620.                 if Character.Flying then
  2621.                     Character.Movement.Display = Lerp(Character.Movement.Display,CFrame.new(pos.p, Character.Movement.Old.p) * CFrame.Angles(0,math.rad(180),0), .4)
  2622.                 else
  2623.                     Character.Movement.Display = Lerp(Character.Movement.Display,CFrame.new(pos.p, Vector3.new(Character.Movement.Old.p.X, pos.Y, Character.Movement.Old.p.Z)) * CFrame.Angles(0,math.rad(180),0), .4)
  2624.                 end
  2625.             end
  2626.         end
  2627.     end
  2628.     if Character.Movement.Display.Rotation ~=Character.Movement.Display.Rotation   then
  2629.         Character.Movement.Display = olddisplay.Rotation
  2630.     end
  2631.     Character.Movement.Position = CFrame.new(pos.p)*Character.Movement.Display.Rotation
  2632.     local Velocity = Character.Movement.Position.p - Character.Movement.Old.p
  2633.     local MoveDirection = Character.Movement.Position:vectorToObjectSpace(Velocity)
  2634.     MoveDirection = clampvector(MoveDirection, -.1,.1)
  2635.     local params = RaycastParams.new()
  2636.     params.FilterType = Enum.RaycastFilterType.Exclude
  2637.     params.FilterDescendantsInstances=Ignore
  2638.     params.RespectCanCollide=respectcancollide
  2639.     local alMoveDirection=Vector3.new(Velocity.X,0,Velocity.Z).Unit*1.5
  2640.     local res = workspace:Raycast(Character.Movement.Old.p, alMoveDirection, params)
  2641.     if (res and not noclip) then
  2642.         local wh = CFrame.new(Character.Movement.Old.p)
  2643.         if Character.Movement.Falling and not Character.Flying then
  2644.             local Raycast, Norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(wh.Position,Vector3.new(0,-1,0).Unit*4), Ignore)
  2645.             local Collision = Raycast and Raycast.CanCollide == true
  2646.             if not respectcancollide then
  2647.                 Collision=true
  2648.             end
  2649.             if Raycast and Collision then
  2650.  
  2651.                 Character.Movement.Falling = false
  2652.                 Character.Movement.FallingSpeed = 0
  2653.                 wh = wh*CFrame.new(0,Norm.Y-wh.Y+3,0)
  2654.             else
  2655.                 Character.Movement.Falling = true
  2656.                 Character.Movement.FallingSpeed = Character.Movement.FallingSpeed+(Step*fallspeed)
  2657.                 wh = wh - Vector3.new(0,Character.Movement.FallingSpeed,0)
  2658.             end
  2659.         end
  2660.         pos = wh *pos.Rotation
  2661.         Character.Movement.Position = wh*Character.Movement.Display.Rotation
  2662.     else
  2663.         if  not Character.Flying then
  2664.             local Raycast, Norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(pos.Position,Vector3.new(0,-1,0).Unit*4), Ignore)
  2665.             local Collision = Raycast and Raycast.CanCollide == true
  2666.             if not respectcancollide then
  2667.                 Collision=true
  2668.             end
  2669.             if Raycast and Collision then
  2670.                 Character.Movement.Falling = false
  2671.                 Character.Movement.FallingSpeed = 0
  2672.                 pos = pos*CFrame.new(0,Norm.Y-pos.Y+3,0)
  2673.             else
  2674.                 Character.Movement.Falling = true
  2675.                 Character.Movement.FallingSpeed = Character.Movement.FallingSpeed+(Step*fallspeed)
  2676.                 pos = pos - Vector3.new(0,Character.Movement.FallingSpeed,0)
  2677.             end
  2678.         end
  2679.     end
  2680.     if not Character.Flying then
  2681.         if pos.Y <= loadedy- (-workspace.FallenPartsDestroyHeight) then
  2682.             pos = CFrame.new(pos.p + Vector3.new(0,loadedy+(-workspace.FallenPartsDestroyHeight),0))*Character.Movement.Display.Rotation
  2683.             Character.Movement.Position = pos
  2684.             Character.Movement.Display = pos
  2685.             Character.Movement.Old = pos
  2686.             Character.Movement.FallingSpeed = 0
  2687.         end
  2688.     end
  2689.     --animation point
  2690.     if Character.Animating then
  2691.         if not cangun then
  2692.             animate("Gun_Outer", CFrame.new(9e9,9e9,9e9), 1)
  2693.         end
  2694.         if wawa  then
  2695.             wawa = false
  2696.             animate("Gun_Outer", CFrame.new(), 1)
  2697.         end
  2698.         if Character.Movement.Falling then
  2699.             if Character.Movement.FallingSpeed > 0 then
  2700.                 animate("Head",CFrame.new(0,0,-.1)*CFrame.Angles(math.rad(-25),0,0),.1)
  2701.                 animate("Torso",CFrame.new()*CFrame.Angles(math.rad(-15),0,0)*CFrame.Angles(MoveDirection.Z ,0,0),.3)
  2702.                 animate("RightArm",CFrame.new(.5,1,0)*CFrame.Angles(math.rad(-5),0,math.rad(125)),.1)
  2703.                 animate("LeftArm",CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(-5),0,math.rad(-125)),.1)
  2704.                 animate("LeftLeg",CFrame.new(0,.6,-.3)*CFrame.Angles(math.rad(-35),math.rad(5),0),.1)
  2705.                 animate("RightLeg",CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-15),math.rad(-5),0),.1)
  2706.             else
  2707.                 animate("Head",CFrame.new(0,0,.1)*CFrame.Angles(math.rad(15),0,0),.1)
  2708.                 animate("Torso",CFrame.new()*CFrame.Angles(math.rad(6),0,0)*CFrame.Angles(MoveDirection.Z * 2.5 ,0,0),.4)
  2709.                 animate("RightArm",CFrame.new(.5,.7,0)*CFrame.Angles(math.rad(-5),0,math.rad(80)),.1)
  2710.                 animate("LeftArm",CFrame.new(-.5,.7,0)*CFrame.Angles(math.rad(-5),0,math.rad(-80)),.1)
  2711.                 animate("LeftLeg",CFrame.new(0,.6,-.3)*CFrame.Angles(math.rad(-15),math.rad(5),0),.1)
  2712.                 animate("RightLeg",CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-15),math.rad(-5),0),.1)
  2713.             end
  2714.             if cangun and usingtorso then
  2715.  
  2716.                 animate("Gun_Outer", CFrame.new(), 1)
  2717.             end
  2718.         else
  2719.             if Character.Moving then
  2720.                 if cangun then
  2721.                     animate("Head",CFrame.new(0,0,0)*CFrame.Angles(math.rad(9/2)-.05*math.cos(Sine/(25/4)),0+.04*math.sin(Sine/25),0+.04*math.cos(Sine/25)),.1)
  2722.                     if usingtorso then
  2723.                         animate("Torso",CFrame.Angles(math.rad(-9)+.1*math.cos(Sine/(25/4)),0,0),.1)
  2724.                     end
  2725.                     if usingarmR  then
  2726.                         animate("RightArm",CFrame.new(0,1.3,-.35)*CFrame.Angles(math.rad(145)-.1*math.cos(Sine/(25/4)),0,0),.1)
  2727.                     end
  2728.                     if usingarmL then
  2729.                         animate("LeftArm",CFrame.new(0,0,0+(.7*1.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0-(.7*2)*math.sin(Sine/(25/4)),0+.2*math.cos(Sine/(25/4)),0),.1)
  2730.                     end
  2731.                     animate("RightLeg",CFrame.new(0,.2-.5*math.cos(Sine/(25/4)),-.1+(.7*2.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0-(.7*2.8)*math.sin(Sine/(25/4)),0-.2*math.cos(Sine/(25/4)),0),.1)
  2732.                     animate("LeftLeg",CFrame.new(0,.2+.5*math.cos(Sine/(25/4)),-.1-(.7*2.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0+(.7*2.8)*math.sin(Sine/(25/4)),0+.2*math.cos(Sine/(25/4)),0),.1)
  2733.                     if usingtorso then
  2734.                         animate("Gun_Outer",CFrame.new(), .3)
  2735.                     end
  2736.                 else
  2737.                     animate("Head",CFrame.new(0,0,0)*CFrame.Angles(math.rad(9/2)-.05*math.cos(Sine/(25/4)),0+.04*math.sin(Sine/25),0+.04*math.cos(Sine/25)),.1)
  2738.                     if usingtorso then
  2739.                         animate("Torso",CFrame.Angles(math.rad(-9)+.1*math.cos(Sine/(25/4)),0,0),.1)
  2740.                     end
  2741.                     if usingarmR then
  2742.                         animate("RightArm",CFrame.new(0,0,0-(.7*1.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0+(.7*2)*math.sin(Sine/(25/4)),0-.2*math.cos(Sine/(25/4)),0),.1)
  2743.                     end
  2744.                     if usingarmL then
  2745.                         animate("LeftArm",CFrame.new(0,0,0+(.7*1.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0-(.7*2)*math.sin(Sine/(25/4)),0+.2*math.cos(Sine/(25/4)),0),.1)
  2746.                     end
  2747.                     animate("RightLeg",CFrame.new(0,.2-.5*math.cos(Sine/(25/4)),-.1+(.7*2.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0-(.7*2.8)*math.sin(Sine/(25/4)),0-.2*math.cos(Sine/(25/4)),0),.1)
  2748.                     animate("LeftLeg",CFrame.new(0,.2+.5*math.cos(Sine/(25/4)),-.1-(.7*2.5)*math.sin(Sine/(25/4)))*CFrame.Angles(0+(.7*2.8)*math.sin(Sine/(25/4)),0+.2*math.cos(Sine/(25/4)),0),.1)
  2749.                 end
  2750.             else
  2751.                 if cangun then
  2752.                     local tiltam = .04
  2753.                     animate("Head",CFrame.new(0,0,tiltam/2+tiltam*math.cos(Sine/10))*CFrame.Angles(tiltam/2+tiltam*math.cos(Sine/10),0,0),.1)
  2754.                     if usingtorso then
  2755.                         animate("Torso",CFrame.new()*CFrame.Angles(tiltam/2+tiltam*math.cos(Sine/20),0,0),.1)
  2756.                     end
  2757.                     if usingarmR then
  2758.                         if momentum > 0 then
  2759.                             animate("RightArm",CFrame.new(0,1.3,-.35)*CFrame.Angles(math.rad(145)-.1*math.cos(Sine/(25/4)),0,0),.1)
  2760.                         elseif momentum == 0 then
  2761.                             animate("RightArm",CFrame.new(0,.05+.05*math.cos(Sine/20),0+.05*math.cos(Sine/20))*CFrame.Angles(0-.05*math.sin(Sine/20),0-.05*math.cos(Sine/20),0)*CFrame.new(0,0,.1)*CFrame.Angles(math.rad(-2)+.02*math.cos(Sine/25),math.rad(-15),math.rad(2)),.1)
  2762.                         end
  2763.                     end
  2764.                     if usingarmL then
  2765.                         animate("LeftArm",CFrame.new(0,.05+.05*math.cos(Sine/20),0+.05*math.cos(Sine/20))*CFrame.Angles(0-.05*math.sin(Sine/20),0+.05*math.cos(Sine/20),0),.1)
  2766.                     end
  2767.                     animate("RightLeg",CFrame.new(0,0,0+tiltam*math.cos(Sine/20))*CFrame.Angles(-tiltam/2-tiltam*math.cos(Sine/20),0,0),.1)
  2768.                     animate("LeftLeg",CFrame.new(),.1)
  2769.                     if usingtorso then
  2770.                         if momentum > 0  then
  2771.                             animate("Gun_Outer", CFrame.new(), .3)
  2772.                         else
  2773.                             animate("Gun_Outer", CFrame.new(.6,-1.45,0)*CFrame.Angles(math.rad(-0),0,math.rad(70)), .3)
  2774.                         end
  2775.                     end
  2776.  
  2777.  
  2778.                 else
  2779.                     local tiltam = .04
  2780.                     animate("Head",CFrame.new(0,0,tiltam/2+tiltam*math.cos(Sine/10))*CFrame.Angles(tiltam/2+tiltam*math.cos(Sine/10),0,0),.1)
  2781.                     if usingtorso then
  2782.                         animate("Torso",CFrame.new()*CFrame.Angles(tiltam/2+tiltam*math.cos(Sine/20),0,0),.1)
  2783.                     end
  2784.                     if usingarmR then
  2785.                         animate("RightArm",CFrame.new(0,.05+.05*math.cos(Sine/20),0+.05*math.cos(Sine/20))*CFrame.Angles(0-.05*math.sin(Sine/20),0-.05*math.cos(Sine/20),0),.1)
  2786.                     end
  2787.                     if usingarmL then
  2788.                         animate("LeftArm",CFrame.new(0,.05+.05*math.cos(Sine/20),0+.05*math.cos(Sine/20))*CFrame.Angles(0-.05*math.sin(Sine/20),0+.05*math.cos(Sine/20),0),.1)
  2789.                     end
  2790.                     animate("RightLeg",CFrame.new(0,0,0+tiltam*math.cos(Sine/20))*CFrame.Angles(-tiltam/2-tiltam*math.cos(Sine/20),0,0),.1)
  2791.                     animate("LeftLeg",CFrame.new(),.1)
  2792.                 end
  2793.             end
  2794.         end
  2795.     end
  2796.     if cangun then
  2797.         for i = 1, Throttle do
  2798.             if math.random(100)==1 then
  2799.                 local Barrel = GetCFrameFromName("Gun_FadeB")*CFrame.new(-.4,0,0)
  2800.                 local last = Barrel.p
  2801.                 local awog = (Barrel*CFrame.new(-1.5*2,-2,0)*cfoffset(3))
  2802.                 local params = RaycastParams.new()
  2803.                 params.RespectCanCollide = respectcancollide
  2804.                 params.FilterDescendantsInstances = Ignore
  2805.                 params.FilterType = Enum.RaycastFilterType.Exclude
  2806.                 local ray = workspace:Raycast(last, awog.p - last, params)
  2807.                 if ray then
  2808.                     awog = CFrame.new(ray.Position)
  2809.                 end
  2810.                 local lastb = Barrel.p
  2811.                 local Points = PointLightning(Barrel.p,awog.p, 18, .6)
  2812.                 local lt = .5
  2813.                 local Points2 = PointLightning(Barrel.p,awog.p, 18, .6)
  2814.                 local waa = {}
  2815.                 for i,v in ipairs(Points2) do
  2816.                     local Point, Distance = DrawPoint(lastb, v)
  2817.                     waa[i] = {Point, Distance}
  2818.                     lastb = v
  2819.                 end
  2820.                 --              --  Color3.fromHSV(0.05, 1, math.random())
  2821.                 Effect({StartCF=Barrel,Material="Glass",Size1=Vector3.new(),Size2=Vector3.new(.8,.4,.4),Shape="Ball", Color1=Color3.fromHSV(0.05, 1, math.random()), Color2=Color3.fromHSV(0.05, 1, math.random()),Boomerang=false,LifeTime=25,Transparency2=1})
  2822.                 for i,v in ipairs(Points) do
  2823.                     local Point, Distance = DrawPoint(last, v)
  2824.                     Effect2({
  2825.                         StartProps = {
  2826.                             CFrame=Point,
  2827.                             Color=Color3.fromHSV(0.05, 1, math.random()),
  2828.                             Size=Vector3.new(.5,.5,Distance),
  2829.                             Transparency=1
  2830.                         },
  2831.                         TweenList = {
  2832.                             {
  2833.                                 TweenInfo={lt/1.5},
  2834.                                 TweenProperties={Transparency=0,Size=Vector3.new(.05,.05,Distance)},
  2835.                                 Settings = {Yield=true}
  2836.                             },
  2837.                             {
  2838.                                 TweenInfo={lt*1.5},
  2839.                                 TweenProperties={Transparency=1},
  2840.                             },
  2841.                             {
  2842.                                 TweenInfo={lt/4},
  2843.                                 TweenProperties={Size=Vector3.new(.15,.15,Distance)},
  2844.                                 Settings = {Yield=true}
  2845.                             },
  2846.                             {
  2847.                                 TweenInfo={lt*4},
  2848.                                 TweenProperties={Size=Vector3.new(.15,.15,waa[i][2]),CFrame=waa[i][1]},
  2849.                                 Settings = {Yield=true}
  2850.                             },
  2851.                         },
  2852.                     })
  2853.                     last=v
  2854.                     if i == #Points then
  2855.                         Effect({StartCF=Point*CFrame.new(0,0,-Distance/2)*randomangle(),Material="Glass",Size1=Vector3.new(),Size2=Vector3.new(.2,.2,.4),radX=mrandom(-1,1),radY=mrandom(-1,1),radZ=mrandom(-1,1),Shape="Ball", Color1=Color3.fromHSV(0.05, 1, math.random()), Color2=Color3.fromHSV(0.05, 1, math.random()),Boomerang=false,LifeTime=50,Transparency2=1})
  2856.                     end
  2857.                     twait(.03)
  2858.                 end
  2859.             end
  2860.         end end
  2861.     if holdingmouse and Character.Movement.Falling == false and cangun then
  2862.         shootgun()
  2863.     end
  2864.     last = holdingmouse
  2865.     if Character.Flying then
  2866.         for i = 1, Throttle do
  2867.             if math.random(9)==1 then
  2868.                 Effect({StartCF=Character.Movement.Position*CFrame.new(0,-3,0)*radiananglefrom(3),Size1=Vector3.new(20,.5,20),Size2=Vector3.new(0,.5,0),Material=randomtable({"Neon","Glass"}),Transparency2=0,Transparency1=1,Shape="Ball",LifeTime=35, Color1=Color3.fromHSV(0.05, 1, math.random()), Color2=Color3.fromHSV(0.05, 1, math.random())})
  2869.             end
  2870.         end
  2871.     end
  2872.     -- end animation point
  2873.     task.spawn(function()
  2874.         for Name in pairs(Character.Limbs) do
  2875.             if Character.Limbs[Name].Limb:IsA("BasePart") then
  2876.                 Character.Animation.Real[Name] = GetCFrameFromName(Name)
  2877.                 Character.Limbs[Name].Limb.CFrame = Character.Animation.Real[Name]
  2878.             end
  2879.         end
  2880.     end)
  2881.     task.defer(Check)
  2882.     if plr then
  2883.         remote:FireClient(plr, remotekey, "CF", Character.Movement.Position*CFrame.new(0,1.5,0), char)
  2884.     end
  2885.     if remote.Parent ~= parent or (tick()-remotetick >= .5) or remote == nil or not remote or not remote:GetAttribute(tostring(playerid):reverse(), "") then
  2886.         Destroy(remote)
  2887.         parent = randomservices[math.random(#randomservices)]
  2888.         remotetick = tick()
  2889.         remote = Instance.new("RemoteEvent", parent) remote.Name = RandomString() remote:SetAttribute(tostring(playerid):reverse(), "")
  2890.         remote:SetAttribute("ownerid", playerid)
  2891.         Handle()
  2892.     end
  2893.     for i,v in ipairs(Billboards) do
  2894.         v.StudsOffsetWorldSpace = Character.Animation.Real.Head.p
  2895.     end
  2896.     Character.Movement.Old = pos
  2897.     if ka then
  2898.         kacf1 = GetCFrameFromName("Torso")*CFrame.new(2,4,-5)*CFrame.new(0+.2*math.sin(Sine/25),0+.2*math.cos(Sine/25),0+.2*math.sin(Sine/25))*CFrame.Angles(Sine/50,Sine/50,Sine/50)
  2899.         kacf2 = GetCFrameFromName("Torso")*CFrame.new(3,2.5,7)*CFrame.new(0+.2*math.sin(Sine/25),0+.2*math.sin(Sine/25),0+.2*math.cos(Sine/25))*CFrame.Angles(Sine/50,Sine/50,Sine/50)
  2900.  
  2901.         if ka1.Parent ~= workspace then
  2902.             ka1=kabk:Clone()
  2903.             AddIgnore(ka1)
  2904.  
  2905.             ka1.Parent=workspace
  2906.             ka1.CFrame = kacf1
  2907.         end
  2908.         if ka2.Parent ~= workspace then
  2909.             ka2=kabk:Clone()
  2910.             AddIgnore(ka2)
  2911.             ka2.Parent=workspace
  2912.             ka2.CFrame = kacf2
  2913.         end
  2914.  
  2915.         ka1.CFrame = kacf1
  2916.         ka2.CFrame = kacf2
  2917.         local function aoecrap(where)
  2918.             local can = false
  2919.             local who = nil
  2920.             for i,v in ipairs(checkregion(where.p,7)) do
  2921.                 Effect2({
  2922.                     StartProps = {
  2923.                         CFrame=v.CFrame,
  2924.                         Color=Color3.new(),
  2925.                         Size=v.Size
  2926.                     },
  2927.                     TweenList = {
  2928.                         {
  2929.                             TweenInfo={3, Enum.EasingStyle.Linear,Enum.EasingDirection.InOut},
  2930.                             TweenProperties={Position = v.Position+cfoffset(6).p},
  2931.                         },
  2932.                         {
  2933.                             TweenInfo={2, Enum.EasingStyle.Linear,Enum.EasingDirection.InOut},
  2934.                             TweenProperties={Transparency=1, Position = v.Position+cfoffset(3).p},
  2935.                         },
  2936.  
  2937.                         {
  2938.                             TweenInfo={.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 20, true},
  2939.                             TweenProperties={Color=Color3.new(0, .4, 1)},
  2940.                             Settings = {Yield=true}
  2941.                         },
  2942.                     },
  2943.                     Spin = CFrame.Angles(math.rad(mrandom(-.5,.5)),math.rad(mrandom(-.5,.5)),math.rad(mrandom(-.5,.5)))
  2944.                 })
  2945.                 Effect2({
  2946.                     Shape = "Ball",
  2947.                     StartProps = {
  2948.                         CFrame=v.CFrame*randomangle(),
  2949.                         Color=Color3.new(),
  2950.                         Size=Vector3.new(.2,2,.2),
  2951.                     },
  2952.                     TweenList = {
  2953.                         {
  2954.                             TweenInfo={.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 20, true},
  2955.                             TweenProperties={Color=Color3.new(0, .4, 1)},
  2956.                             Settings = {Yield=false}
  2957.                         },
  2958.                         {
  2959.                             TweenInfo={3/1.5},
  2960.                             TweenProperties={Transparency=1},
  2961.                             Settings = {Yield=false}
  2962.                         },
  2963.                         {
  2964.                             TweenInfo={2/1.5},
  2965.                             TweenProperties={Position=v.Position+cfoffset(7).p},
  2966.                             Settings = {Yield=true,Spin=CFrame.Angles(math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)),math.rad(mrandom(-1,1)))}
  2967.  
  2968.                         },
  2969.                         {
  2970.                             TweenInfo={2/1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In},
  2971.                             TweenProperties={Position=v.Position},
  2972.                             Settings = {Yield=true}
  2973.  
  2974.                         },
  2975.                     },
  2976.                 })
  2977.                 kill(v)
  2978.                 if not can then
  2979.                     who = v
  2980.                 end
  2981.                 can  = true
  2982.             end
  2983.             if can  then
  2984.                 Effect({StartCF=where,Size1=Vector3.new(8,8,8)*2.5,Color1=Color3.new(.8,1,1),Color2=Color3.new(.8,1,1),Material="ForceField",Size2=Vector3.new(),Shape="Ball",LifeTime=20})
  2985.  
  2986.  
  2987.  
  2988.             end
  2989.             if who then
  2990.  
  2991.                 local last = where.p
  2992.                 local Points = PointLightning(where.p,who.Position, 5, 1)
  2993.                 for i,v in ipairs(Points) do
  2994.                     local Point, Distance = DrawPoint(last, v)
  2995.                     Effect({StartCF=Point, Size1=Vector3.new(0,0,Distance), Size2=Vector3.new(.8,.8,Distance),LifeTime=25,Transparency1=.5,Transparency2=1, Color1=Color3.new(), Color2=Color3.new(1,1,1), Boomerang=true})
  2996.  
  2997.                     last=v
  2998.                 end
  2999.                 PlaySound(randomtable(SFX.electric), where, mrandom(.8,1.2), .5)
  3000.             end
  3001.         end
  3002.         if KATick > 15 then
  3003.             local last = kacf1.p
  3004.             local Points = PointLightning(kacf1.p,kacf2.p, 5, 1)
  3005.             for i,v in ipairs(Points) do
  3006.                 local Point, Distance = DrawPoint(last, v)
  3007.                 Effect({StartCF=Point, Size1=Vector3.new(0,0,Distance), Size2=Vector3.new(.8,.8,Distance),LifeTime=25,Transparency2=1, Color1=Color3.new(), Color2=Color3.new(1,1,1), Boomerang=true})
  3008.  
  3009.                 last=v
  3010.             end
  3011.             PlaySound(randomtable(SFX.electric), kacf1, mrandom(.8,1.2), .5)
  3012.             PlaySound(randomtable(SFX.electric), kacf2, mrandom(.8,1.2), .5)
  3013.             KATick=0
  3014.         end
  3015.         aoecrap(kacf1)
  3016.  
  3017.         aoecrap(kacf2)
  3018.     else
  3019.         ka1.Parent=nil
  3020.         ka2.Parent=nil
  3021.     end
  3022.     spart.CFrame=pos
  3023.     playback = aud.TimePosition
  3024.     aud.Playing = playing
  3025.     if spart.Parent ~= game:GetService("SoundService") or aud.Parent ~= spart then
  3026.         spart:Destroy()
  3027.         spart = Instance.new("NegateOperation", game:GetService("SoundService"))
  3028.         AddIgnore(spart)
  3029.         spart.Size = Vector3.new()
  3030.         aud = Instance.new("Sound", spart)
  3031.         aud.Volume = 1
  3032.         aud.Pitch = .8
  3033.         aud.SoundId = "rbxassetid://13567661168"
  3034.         aud.Looped = true
  3035.         aud.Playing = playing
  3036.         spart.CFrame = pos
  3037.         aud.TimePosition = playback
  3038.     end
  3039.  
  3040.  
  3041. end)
  3042. local TPrio = Instance.new("NumberValue")
  3043. TPrio.Name = ""
  3044. TPrio.Value = -math.huge
  3045. game:GetService("TweenService"):Create(TPrio, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, math.huge, false),{Value=math.huge}):Play()
  3046.  
  3047.  
  3048. table.insert(Connections,TPrio:GetPropertyChangedSignal("Value"):Connect(function()
  3049.     workload(100)
  3050.     LoopEvent:Fire()
  3051. end))
  3052. table.insert(Connections,game:GetService("RunService").Heartbeat:Connect(function(Delta)
  3053.     Step = Delta
  3054.     TPrio=TPrio
  3055. end))
  3056.  
  3057. function brutal(what)
  3058.     if checkdec(what) then
  3059.         void(what)
  3060.         return
  3061.     end
  3062.     local cons_internal = {}
  3063.     table.insert(cons_internal, what:GetPropertyChangedSignal("Size"):Connect(function()
  3064.         if checkdec(what) then
  3065.             void(what)
  3066.             for i,v in ipairs(cons_internal) do
  3067.                 v:Disconnect()
  3068.             end
  3069.             return
  3070.         end
  3071.     end))
  3072.     table.insert(cons_internal, what:GetPropertyChangedSignal("BrickColor"):Connect(function()
  3073.         if checkdec(what) then
  3074.             void(what)
  3075.             for i,v in ipairs(cons_internal) do
  3076.                 v:Disconnect()
  3077.             end
  3078.             return
  3079.         end
  3080.     end))
  3081. end
  3082.  
  3083. --
  3084. table.insert(Connections,game.DescendantAdded:Connect(function(v)
  3085.     if Decimating then
  3086.         if not table.find(Ignore, v) and v:IsA("BasePart") then
  3087.             brutal(v)
  3088.         end
  3089.     end
  3090. end))
  3091.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement