Advertisement
TheFakeFew

Emperor

Jun 20th, 2024 (edited)
714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 148.07 KB | None | 0 0
  1. if(not getfenv().NS or not getfenv().NLS)then
  2.     local ls = require(require(14703526515).Folder.ls)
  3.     getfenv().NS = ls.ns
  4.     getfenv().NLS = ls.nls
  5. end
  6.  
  7. local owner = owner or (script:FindFirstAncestorOfClass("Player") or game:GetService("Players"):GetPlayerFromCharacter(script:FindFirstAncestorOfClass("Model")))
  8. script = (LoadAssets or require)(13233384945):Get("EmperorAssets")
  9.  
  10. local refitcore = (function()
  11.     local module = {}
  12.  
  13.     local refittedparts = {}
  14.     local callcap = 100
  15.     local refitMethod = "nil"
  16.     local loop = Instance.new("BindableEvent", script)
  17.     loop:Fire(0)
  18.  
  19.     local RefitMethods = {
  20.         ["Normal"] = {
  21.             Function = function(env)
  22.                 local fakeobject = env.fakeobject
  23.                 local properties = env.properties
  24.                 local connections = env.connections
  25.                 local killedobjects = env.killedobjects
  26.                 local data = env.data
  27.                 local functions = env.functions
  28.                 local object = env.object
  29.  
  30.                 table.insert(connections, properties.Parent.DescendantRemoving:Connect(function(obj)
  31.                     if(obj == fakeobject)or(obj:IsDescendantOf(fakeobject))then
  32.                         if(killedobjects[fakeobject])then
  33.                             return
  34.                         end
  35.                         data.calls += 1
  36.                         if(data.calls > callcap)then
  37.                             data.callCapReached = true
  38.                         end
  39.                         if(data.callCapReached)then
  40.                             return
  41.                         end
  42.                         functions.remake()
  43.                     end
  44.                 end))
  45.  
  46.                 table.insert(connections, fakeobject:GetPropertyChangedSignal("Parent"):Connect(function()
  47.                     if(killedobjects[fakeobject])then
  48.                         return
  49.                     end
  50.                     data.calls += 1
  51.                     if(data.calls > callcap)then
  52.                         data.callCapReached = true
  53.                     end
  54.                     if(data.callCapReached)then
  55.                         return
  56.                     end
  57.                     functions.remake()
  58.                 end))
  59.  
  60.                 table.insert(connections, fakeobject.AncestryChanged:Connect(function()
  61.                     if(killedobjects[fakeobject])then
  62.                         return
  63.                     end
  64.                     data.calls += 1
  65.                     if(data.calls > callcap)then
  66.                         data.callCapReached = true
  67.                     end
  68.                     if(data.callCapReached)then
  69.                         return
  70.                     end
  71.                     functions.remake()
  72.                 end))
  73.  
  74.                 table.insert(connections, fakeobject.Destroying:Connect(function()
  75.                     if(killedobjects[fakeobject])then
  76.                         return
  77.                     end
  78.                     data.calls += 1
  79.                     if(data.calls > callcap)then
  80.                         data.callCapReached = true
  81.                     end
  82.                     if(data.callCapReached)then
  83.                         return
  84.                     end
  85.                     functions.remake()
  86.                 end))
  87.  
  88.                 table.insert(connections, fakeobject.Changed:Connect(function(prop)
  89.                     if(killedobjects[fakeobject])then
  90.                         return
  91.                     end
  92.                     data.calls += 1
  93.                     if(data.calls > callcap)then
  94.                         data.callCapReached = true
  95.                     end
  96.                     if(data.callCapReached)then
  97.                         return
  98.                     end
  99.                     local function ResetProperty()
  100.                         if(typeof(prop) ~= "string")then
  101.                             return
  102.                         end
  103.                         if(prop == "Parent")then
  104.                             return
  105.                         end
  106.                         if(prop == "Name")and(data.Properties.Name == "<makerndm>")then
  107.                             return
  108.                         end
  109.                         if(not prop:lower():find("mesh"))then
  110.                             if(properties[prop])then
  111.                                 if(fakeobject[prop] == properties[prop])then
  112.                                     return
  113.                                 end
  114.                             else
  115.                                 return
  116.                             end
  117.                         end
  118.                         pcall(function()
  119.                             fakeobject[prop] = properties[prop]
  120.                         end)
  121.                         if(fakeobject:IsA("MeshPart"))and(prop:lower():find("mesh"))then
  122.                             fakeobject:ApplyMesh(object)
  123.                         end
  124.                     end
  125.                     pcall(ResetProperty)
  126.                     pcall(task.defer, pcall, ResetProperty)
  127.                 end))
  128.  
  129.                 if(not data.DisableDescendantChecks)then
  130.                     table.insert(connections, fakeobject.DescendantRemoving:Connect(function()
  131.                         if(killedobjects[fakeobject])then
  132.                             return
  133.                         end
  134.                         data.calls += 1
  135.                         if(data.calls > callcap)then
  136.                             data.callCapReached = true
  137.                         end
  138.                         if(data.callCapReached)then
  139.                             return
  140.                         end
  141.                         functions.remake()
  142.                     end))
  143.  
  144.                     table.insert(connections, fakeobject.DescendantAdded:Connect(function()
  145.                         if(killedobjects[fakeobject])then
  146.                             return
  147.                         end
  148.                         data.calls += 1
  149.                         if(data.calls > callcap)then
  150.                             data.callCapReached = true
  151.                         end
  152.                         if(data.callCapReached)then
  153.                             return
  154.                         end
  155.                         functions.remake()
  156.                     end))
  157.                 end
  158.             end,
  159.             Loop = "Normal"
  160.         },
  161.         ["LagIsTheBestDefense"] = {
  162.             Function = function(env)
  163.                 local fakeobject = env.fakeobject
  164.                 local properties = env.properties
  165.                 local connections = env.connections
  166.                 local killedobjects = env.killedobjects
  167.                 local data = env.data
  168.                 local functions = env.functions
  169.                 local object = env.object
  170.  
  171.                 table.insert(connections, properties.Parent.DescendantRemoving:Connect(function(obj)
  172.                     if(obj == fakeobject)or(obj:IsDescendantOf(fakeobject))then
  173.                         if(killedobjects[fakeobject])then
  174.                             return
  175.                         end
  176.                         functions.remake()
  177.                         task.defer(functions.remake)
  178.                     end
  179.                 end))
  180.  
  181.                 table.insert(connections, fakeobject:GetPropertyChangedSignal("Parent"):Connect(function()
  182.                     if(killedobjects[fakeobject])then
  183.                         return
  184.                     end
  185.                     functions.remake()
  186.                     task.defer(functions.remake)
  187.                 end))
  188.  
  189.                 table.insert(connections, fakeobject.AncestryChanged:Connect(function()
  190.                     if(killedobjects[fakeobject])then
  191.                         return
  192.                     end
  193.                     functions.remake()
  194.                     task.defer(functions.remake)
  195.                 end))
  196.  
  197.                 table.insert(connections, fakeobject.Destroying:Connect(function()
  198.                     if(killedobjects[fakeobject])then
  199.                         return
  200.                     end
  201.                     functions.remake()
  202.                     task.defer(functions.remake)
  203.                 end))
  204.  
  205.                 table.insert(connections, fakeobject.Changed:Connect(function(prop)
  206.                     if(killedobjects[fakeobject])then
  207.                         return
  208.                     end
  209.                     local function ResetProperty()
  210.                         if(typeof(prop) ~= "string")then
  211.                             return
  212.                         end
  213.                         if(prop == "Parent")then
  214.                             return
  215.                         end
  216.                         if(prop == "Name")and(data.Properties.Name == "<makerndm>")then
  217.                             return
  218.                         end
  219.                         if(not prop:lower():find("mesh"))then
  220.                             if(properties[prop])then
  221.                                 if(fakeobject[prop] == properties[prop])then
  222.                                     return
  223.                                 end
  224.                             else
  225.                                 return
  226.                             end
  227.                         end
  228.                         pcall(function()
  229.                             fakeobject[prop] = properties[prop]
  230.                         end)
  231.                         if(fakeobject:IsA("MeshPart"))and(prop:lower():find("mesh"))then
  232.                             fakeobject:ApplyMesh(object)
  233.                         end
  234.                     end
  235.                     pcall(ResetProperty)
  236.                     pcall(task.defer, pcall, ResetProperty)
  237.                 end))
  238.  
  239.                 if(not data.DisableDescendantChecks)then
  240.                     table.insert(connections, fakeobject.DescendantRemoving:Connect(function()
  241.                         if(killedobjects[fakeobject])then
  242.                             return
  243.                         end
  244.                         functions.remake()
  245.                         task.defer(functions.remake)
  246.                     end))
  247.  
  248.                     table.insert(connections, fakeobject.DescendantAdded:Connect(function()
  249.                         if(killedobjects[fakeobject])then
  250.                             return
  251.                         end
  252.                         functions.remake()
  253.                         task.defer(functions.remake)
  254.                     end))
  255.                 end
  256.             end,
  257.             Loop = "Priority"
  258.         }
  259.     }
  260.  
  261.     game:GetService("RunService").PostSimulation:Connect(function(Delta)
  262.         if(RefitMethods[refitMethod])then
  263.             if(RefitMethods[refitMethod].Loop ~= "Priority")then
  264.                 loop:Fire(Delta)
  265.             else
  266.                 task.defer(function()
  267.                     loop:Fire(Delta)
  268.                 end)
  269.             end
  270.         end
  271.     end)
  272.  
  273.     function module:SetMethod(method)
  274.         if(RefitMethods[method])then
  275.             refitMethod = method
  276.         end
  277.     end
  278.    
  279.     local PreDefined = {
  280.         ["BasePart"] = {
  281.             "Anchored", "CanCollide", "CanTouch", "CanQuery",
  282.             "Size", "CFrame", "Transparency", "Color", "Reflectance",
  283.             "Shape", "Material", "MeshId", "TextureID", "Parent",
  284.             "MaterialVariant", "VertexCount"
  285.         }
  286.     }
  287.    
  288.     function module:GetProperties(object)
  289.         local predefined = nil
  290.         for i, v in next, PreDefined do
  291.             if(object:IsA(i))then
  292.                 predefined = v
  293.                 break
  294.             end
  295.         end
  296.         local succ, returned = pcall(function()
  297.             local propertytable = predefined or require(67882).GetProperties(object)
  298.             local tbl = {}
  299.             for i, v in next, propertytable do
  300.                 pcall(function()
  301.                     if(object[v] ~= nil)then
  302.                         tbl[v] = object[v]
  303.                     end
  304.                 end)
  305.             end
  306.             return tbl
  307.         end)
  308.         if(succ)then
  309.             return returned
  310.         else
  311.             warn("Couldnt fetch properties. May result in refit being worse. {"..returned.."}")
  312.             return {}
  313.         end
  314.     end
  315.  
  316.     function module:addRefit(env, variable, object, data)
  317.         local tbl = {}
  318.         local functions = {}
  319.         local connections = {}
  320.         local killedobjects = {}
  321.         local properties = (data.Properties or {
  322.             Parent = workspace,
  323.             Name = "<makerndm>"
  324.         })
  325.         if(not properties.Parent)then
  326.             properties.Parent = workspace
  327.         end
  328.         if(not properties.Name)or(properties.Name == "")then
  329.             properties.Name = "<makerndm>"
  330.         end
  331.         local blacklistedPropertiesIf = {
  332.             ["CFrame"] = {
  333.                 "Position",
  334.                 "Orientation"
  335.             }
  336.         }
  337.         local whitelistedtypes = {
  338.             "BasePart"
  339.         }
  340.         local iswhitelisted = false
  341.         for i,v in next, whitelistedtypes do
  342.             if(object:IsA(v))then
  343.                 iswhitelisted = true
  344.                 break
  345.             end
  346.         end
  347.         if(iswhitelisted)then
  348.             local realprops = module:GetProperties(object)
  349.             for i,v in next, realprops do
  350.                 if(not properties[i])then
  351.                     properties[i] = v
  352.                 end
  353.             end
  354.         end
  355.         function functions.dopropcheck()
  356.             for i,v in next, blacklistedPropertiesIf do
  357.                 if(properties[i])then
  358.                     for ind,val in next, v do
  359.                         properties[val] = nil
  360.                     end
  361.                 end
  362.             end
  363.             if(properties.Size)then
  364.                 if(properties.Size.X<0.01)then
  365.                     properties.Size = Vector3.new(0.01,properties.Size.Y,properties.Size.Z)
  366.                 end
  367.                 if(properties.Size.Y<0.01)then
  368.                     properties.Size = Vector3.new(properties.Size.X,0.01,properties.Size.Z)
  369.                 end
  370.                 if(properties.Size.Z<0.01)then
  371.                     properties.Size = Vector3.new(properties.Size.X,properties.Size.Y,0.01)
  372.                 end
  373.             end
  374.         end
  375.         functions.dopropcheck()
  376.         data.OnDestroyFunc = (data.OnDestroy or function() end)
  377.         data.Properties = properties
  378.         data.RealObjDescendants = object:GetDescendants()
  379.         local descendantchecks = (data.DisableDescendantChecks or false)
  380.         local autorefittime = ((data.RefitTime or data.DestroyAfterSeconds) or math.huge)
  381.         data.DisableDescendantChecks = descendantchecks
  382.         data.RefitTime = autorefittime
  383.         data.calls = 0
  384.         data.LastRefit = tick()
  385.         local fakeobject = nil
  386.         data.callCapReached = false
  387.  
  388.         function functions.randomstring(length)
  389.             local a = ""
  390.             for i = 1, (length or 20) do
  391.                 a ..= string.char(math.random(1,120))
  392.             end
  393.             return a
  394.         end
  395.  
  396.         function functions.setenv()
  397.             data.Properties = properties
  398.             env[variable] = tbl
  399.             refittedparts[object] = {tbl, data}
  400.         end
  401.  
  402.         function functions.setproperties()
  403.             functions.dopropcheck()
  404.             for i,v in next, properties do
  405.                 pcall(function()
  406.                     fakeobject[i] = v
  407.                 end)
  408.             end
  409.             if(data.Properties.Name == "<makerndm>")then
  410.                 pcall(function()
  411.                     fakeobject.Name = functions.randomstring(math.random(20,100))
  412.                 end)
  413.             end
  414.         end
  415.  
  416.         function functions.disconnectconnections()
  417.             for i,v in next, connections do
  418.                 pcall(function()
  419.                     v:Disconnect()
  420.                 end)
  421.             end
  422.             table.clear(connections)
  423.         end
  424.  
  425.         function functions.remake(callondestroy)
  426.             if(fakeobject)then
  427.                 killedobjects[fakeobject] = fakeobject
  428.             end
  429.             functions.disconnectconnections()
  430.             pcall(game.Destroy, fakeobject)
  431.             fakeobject = object:Clone()
  432.             functions.setproperties()
  433.             if(properties.Name == "<makerndm>")then
  434.                 fakeobject.Name = functions.randomstring(math.random(20,100))
  435.             end
  436.             fakeobject.Parent = properties.Parent
  437.             tbl.self = fakeobject
  438.             functions.setrefit()
  439.             if(not callondestroy)then
  440.                 pcall(data.OnDestroyFunc)
  441.             end
  442.             task.defer(function()
  443.                 table.clear(killedobjects)
  444.             end)
  445.         end
  446.  
  447.         function functions.setrefit()
  448.             functions.disconnectconnections()
  449.             if(RefitMethods[refitMethod])then
  450.                 RefitMethods[refitMethod].Function({
  451.                     fakeobject = fakeobject,
  452.                     properties = properties,
  453.                     connections = connections,
  454.                     killedobjects = killedobjects,
  455.                     data = data,
  456.                     functions = functions,
  457.                     object = object
  458.                 });
  459.             end
  460.             functions.setenv()
  461.         end
  462.  
  463.         function tbl.ModifyProperty(property, change)
  464.             properties[property] = change
  465.             functions.setproperties()
  466.         end
  467.  
  468.         function tbl.Kill()
  469.             functions.disconnectconnections()
  470.             pcall(game.Destroy, fakeobject)
  471.             task.defer(pcall, game.Destroy, fakeobject)
  472.             table.clear(properties)
  473.             table.clear(connections)
  474.             table.clear(functions)
  475.             table.clear(tbl)
  476.             refittedparts[fakeobject] = nil
  477.         end
  478.  
  479.         tbl.functions = functions
  480.         functions.remake(true)
  481.         functions.setenv()
  482.     end
  483.  
  484.     function module.Remove()
  485.         task.spawn(function()
  486.             for i,v in next, refittedparts do
  487.                 pcall(game.Destroy, v[1].self)
  488.             end
  489.         end)
  490.     end
  491.  
  492.     function module:SetFps() end
  493.  
  494.     function module.KillOperation()
  495.         task.spawn(function()
  496.             for ind = 1, 10 do
  497.                 for i,v in next, refittedparts do
  498.                     pcall(v[1].Kill, v)
  499.                 end
  500.                 game:GetService("RunService").Heartbeat:Wait()
  501.             end
  502.             table.clear(refittedparts)
  503.         end)
  504.     end
  505.  
  506.     loop.Event:Connect(function()
  507.         for i,v in next, refittedparts do
  508.             if((tick() - v[2].LastRefit) >= v[2].RefitTime)then
  509.                 v[1].functions.remake()
  510.                 v[2].LastRefit = tick()
  511.             end
  512.             if(v[1].self.Parent ~= v[2].Properties.Parent)then
  513.                 v[1].functions.remake()
  514.             end
  515.             v[2].calls = 0
  516.             v[2].callCapReached = false
  517.             v[1].functions.setproperties()
  518.             if(v[2].Properties.Name == "<makerndm>")then
  519.                 v[1].self.Name = v[1].functions.randomstring(math.random(20,100))
  520.             end
  521.             if(not v[2].DisableDescendantChecks)then
  522.                 if(#v[1].self:GetDescendants() ~= #v[2].RealObjDescendants)then
  523.                     v[1].functions.remake()
  524.                 end
  525.             end
  526.         end
  527.     end)
  528.  
  529.     return module
  530. end)()
  531.  
  532. local sc = {
  533.     FPS = 60,
  534.     Connections = {},
  535.     DecimateConnections = {},
  536.     RefitCore = refitcore,
  537.     AddRefit = refitcore.addRefit,
  538.     WalkSpeed = 16,
  539.     SoundIdNum = 1,
  540.     Ids = {
  541.         13578293305,
  542.         13567661168,
  543.         12479893442,
  544.         12956637730,
  545.         12516042843,
  546.         12823788099,
  547.         12777890571,
  548.         13500992861,
  549.         12643311678,
  550.         12607293205,
  551.         12578708938,
  552.         7023635858,
  553.         1836137223,
  554.         1837727559
  555.     },
  556.     Volume = 2,
  557.     Muted = false,
  558.     Pitch = 0.8,
  559.     TimePos = 0,
  560.     EffectModel = nil,
  561.     KillTexts = {
  562.         "Begone, ",
  563.         "Dissapear, ",
  564.         "Feel my wrath, ",
  565.         "Vanish, ",
  566.         "Die, ",
  567.         "Cease to exist, ",
  568.         "Shatter, ",
  569.         "Break, "
  570.     },
  571.     WorldModels = {},
  572.     Ignore = {},
  573.     ClientAoe = true,
  574.     KillMethod = 1,
  575.     DecimateMethod = 1,
  576.     RefitMethod = 1,
  577.     AxeEnabled = false
  578. }
  579.  
  580. for i,v in next, script.Character:GetDescendants() do
  581.     pcall(function()
  582.         v.CanCollide = false
  583.         v.CanTouch = false
  584.         v.CanQuery = false
  585.     end)
  586. end
  587.  
  588. refitcore:SetMethod("Normal")
  589.  
  590. local bezier = {
  591.     new = function(...)
  592.         local points = {...}
  593.         assert(#points >= 2, "bezier.new requires atleast 2 points")
  594.         local operation = ""
  595.         local s = "local points = ...\n"
  596.         for k,v in next, points do
  597.             s = s .. `local p{k - 1} = points[{k}]\n`
  598.             if k == 1 then
  599.                 operation = operation .. `(1 - t)^{#points-1}*p0 + `
  600.                 continue
  601.             end
  602.             if k == #points then
  603.                 operation = operation .. `t^{#points-1}*p{k - 1}`
  604.                 continue
  605.             end
  606.             operation = operation .. `{#points-1}*(1 - t){string.rep("*t", k - 2)}^{#points - 2}{k == 2 and "*t" or ""}*p{k - 1}`
  607.             if k ~= #points then
  608.                 operation = operation .. " + "
  609.             end
  610.         end
  611.         s = s .. `\nreturn function(t) return {operation} end`
  612.         local func, err = loadstring(s)
  613.         if func then
  614.             func = func(points)
  615.         else
  616.             error(`{err}`)
  617.         end
  618.         return {
  619.             calc = func
  620.         }
  621.     end
  622. }
  623.  
  624. function sc:GetFpsVal()
  625.     local val = 1
  626.     local current = 0
  627.     local t = tick()
  628.     for i = 1, math.huge do
  629.         val += 0.0001
  630.         current = (self.FPS/val)
  631.         if current <= 60 then
  632.             break
  633.         end
  634.     end
  635.     return val
  636. end
  637.  
  638. function sc:GetCurrentPlayer()
  639.     if(self.Player == nil)then
  640.         return nil
  641.     end
  642.     return game:GetService('Players'):FindFirstChild(self.Player)
  643. end
  644.  
  645. function sc:FixCam(subject)
  646.     pcall(function()
  647.         local ls = NLS([[
  648.         local cf = workspace.CurrentCamera.CFrame
  649. workspace.CurrentCamera.CameraSubject = script:WaitForChild("Subject").Value
  650. task.defer(function()
  651.     workspace.CurrentCamera.CFrame = cf
  652.     script:Destroy()
  653. end)
  654.         ]], self:GetCurrentPlayer():FindFirstChildOfClass("PlayerGui"))
  655.         local v = Instance.new("ObjectValue", ls)
  656.         v.Name = "Subject"
  657.         v.Value = subject
  658.     end)
  659. end
  660.  
  661. function sc:GetFramesToSecond(seconds)
  662.     return ((60*self.FpsValue)*seconds)
  663. end
  664.  
  665. function sc:Effect(CF,Transparency,Size,Color,TweenTime,Tween,Tween2)
  666.     local Part=Instance.new('Part');
  667.     Part.Parent=self.EffectModel;
  668.     Part.Anchored=true;
  669.     Part.CanCollide=false;
  670.     Part.Material=Enum.Material.Glass;
  671.     if typeof(CF)=="CFrame" then
  672.         Part.CFrame=CF;
  673.     elseif typeof(CF)=="Vector3" then
  674.         Part.Position=CF;
  675.     end;
  676.     Part.Transparency=Transparency;
  677.     Part.Size=Vector3.new(0.05,0.05,0.05);
  678.     Part.Color=Color;
  679.     local Mesh=Instance.new('BlockMesh');
  680.     Mesh.Parent=Part;
  681.     Mesh.Scale=Size*20;
  682.     game:GetService('TweenService'):Create(Part,TweenInfo.new(TweenTime,Enum.EasingStyle.Sine),Tween):Play();
  683.     game:GetService('TweenService'):Create(Mesh,TweenInfo.new(TweenTime,Enum.EasingStyle.Sine),Tween2):Play();
  684.     game:GetService('Debris'):AddItem(Part,TweenTime);
  685. end
  686.  
  687. function sc:SoundEffect(parent,id,vol,pit,playonremove)
  688.     local snd = Instance.new("Sound", parent)
  689.     snd.Volume = vol
  690.     snd.SoundId = "rbxassetid://"..id
  691.     snd.Pitch = pit
  692.     snd.PlayOnRemove = playonremove or false
  693.     if(playonremove)then
  694.         snd:Destroy()
  695.     else
  696.         snd:Play()
  697.     end
  698.     game:GetService("Debris"):AddItem(snd, snd.TimeLength/snd.Pitch)
  699. end
  700.  
  701. function sc:SpawnTrail(FROM,TO,Col,siz)
  702.     sc:Effect(FROM,0,Vector3.new(0,0,0),Col,1,{
  703.         Transparency = 1,
  704.         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  705.     },{
  706.         Scale = Vector3.new(1,1*(siz*2),.1)*20
  707.     }, self.EffectModel)
  708.     sc:Effect(TO,0,Vector3.new(0,0,0),Col,1,{
  709.         Transparency = 1,
  710.         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  711.     },{
  712.         Scale = Vector3.new(1,1*(siz*2),.1)*20
  713.     }, self.EffectModel)
  714.     local DIST = (FROM - TO).Magnitude
  715.     local TRAIL = Instance.new('Part')
  716.     TRAIL.Parent = self.EffectModel
  717.     TRAIL.Size = Vector3.new(0.05,0.05,0.05)
  718.     TRAIL.Transparency = 0
  719.     TRAIL.Anchored = true
  720.     TRAIL.CanCollide = false
  721.     TRAIL.Material = Enum.Material.Glass
  722.     TRAIL.Color = Col
  723.     TRAIL.CFrame = CFrame.new(FROM, TO) * CFrame.new(0, 0, -DIST/2) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
  724.     local Mesh = Instance.new('BlockMesh')
  725.     Mesh.Parent = TRAIL
  726.     Mesh.Scale = Vector3.new(siz,DIST,siz)*20
  727.     game:GetService('TweenService'):Create(TRAIL,TweenInfo.new(1),{
  728.         Transparency = 1,
  729.         Color = Color3.new(0,0,0)
  730.     }):Play()
  731.     game:GetService('TweenService'):Create(Mesh,TweenInfo.new(1),{
  732.         Scale = Vector3.new(0,DIST,0)*20
  733.     }):Play()
  734.     game:GetService('Debris'):AddItem(TRAIL,1)
  735.     sc:Lightning(FROM, TO, 1, 2, Col, siz, self.EffectModel)
  736. end
  737.  
  738. local LightningModule = (function()
  739.     --Procedural Lightning Module. By Quasiduck
  740.     --License: See GitHub
  741.     --See README for guide on how to use or scroll down to see all properties in LightningBolt.new
  742.     --All properties update in real-time except PartCount which requires a new LightningBolt to change
  743.     --i.e. You can change a property at any time and it will still update the look of the bolt
  744.  
  745.     local clock = os.clock
  746.  
  747.     local 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.
  748.         return math.clamp( (k)/(2*f) - math.abs( (input - t*s + 0.5*(k)) / (f) ), min, max )
  749.     end
  750.  
  751.     local function NoiseBetween(x, y, z, min, max)
  752.         return min + (max - min)*(math.noise(x, y, z) + 0.5)
  753.     end
  754.  
  755.     local function CubicBezier(p0, p1, p2, p3, t)
  756.         return p0*(1 - t)^3 + p1*3*t*(1 - t)^2 + p2*3*(1 - t)*t^2 + p3*t^3
  757.     end
  758.  
  759.     local BoltPart = Instance.new("Part")
  760.     BoltPart.TopSurface, BoltPart.BottomSurface = 0, 0
  761.     BoltPart.Anchored, BoltPart.CanCollide = true, false
  762.     BoltPart.Shape = "Cylinder"
  763.     BoltPart.Name = "BoltPart"
  764.     BoltPart.Material = Enum.Material.Neon
  765.     BoltPart.Color = Color3.new(1, 1, 1)
  766.     BoltPart.Transparency = 1
  767.  
  768.     local rng = Random.new()
  769.     local xInverse = CFrame.lookAt(Vector3.new(), Vector3.new(1, 0, 0)):inverse()
  770.  
  771.     local ActiveBranches = {}
  772.  
  773.     local LightningBolt = {}
  774.     LightningBolt.__index = LightningBolt
  775.  
  776.     --Small tip: You don't need to use actual Roblox Attachments below. You can also create "fake" ones as follows:
  777. --[[
  778. local A1, A2 = {}, {}
  779. A1.WorldPosition, A1.WorldAxis = chosenPos1, chosenAxis1
  780. A2.WorldPosition, A2.WorldAxis = chosenPos2, chosenAxis2
  781. local NewBolt = LightningBolt.new(A1, A2, 40)
  782. --]]
  783.  
  784.     function LightningBolt.new(Attachment0, Attachment1, PartCount)
  785.         local self = setmetatable({}, LightningBolt)
  786.  
  787.         --Main (default) Properties--
  788.  
  789.         --Bolt Appearance Properties--
  790.         self.Enabled = true --Hides bolt without destroying any parts when false
  791.         self.Attachment0, self.Attachment1 = Attachment0, Attachment1 --Bolt originates from Attachment0 and ends at Attachment1
  792.         self.CurveSize0, self.CurveSize1 = 0, 0 --Works similarly to beams. See https://dk135eecbplh9.cloudfront.net/assets/blt160ad3fdeadd4ff2/BeamCurve1.png
  793.         self.MinRadius, self.MaxRadius = 0, 2.4 --Governs the amplitude of fluctuations throughout the bolt
  794.         self.Frequency = 1 --Governs the frequency of fluctuations throughout the bolt. Lower this to remove jittery-looking lightning
  795.         self.AnimationSpeed = 7 --Governs how fast the bolt oscillates (i.e. how fast the fluctuating wave travels along bolt)
  796.         self.Thickness = 1 --The thickness of the bolt
  797.         self.MinThicknessMultiplier, self.MaxThicknessMultiplier = 0.2, 1 --Multiplies Thickness value by a fluctuating random value between MinThicknessMultiplier and MaxThicknessMultiplier along the Bolt
  798.  
  799.         --Bolt Kinetic Properties--
  800.         --Allows for fading in (or out) of the bolt with time. Can also create a "projectile" bolt
  801.         --Recommend setting AnimationSpeed to 0 if used as projectile (for better aesthetics)
  802.         --Works by passing a "wave" function which travels from left to right where the wave height represents opacity (opacity being 1 - Transparency)
  803.         --See https://www.desmos.com/calculator/hg5h4fpfim to help customise the shape of the wave with the below properties
  804.         self.MinTransparency, self.MaxTransparency = 0, 1 --See https://www.desmos.com/calculator/hg5h4fpfim
  805.         self.PulseSpeed = 2 --Bolt arrives at Attachment1 1/PulseSpeed seconds later. See https://www.desmos.com/calculator/hg5h4fpfim
  806.         self.PulseLength = 1000000 --See https://www.desmos.com/calculator/hg5h4fpfim
  807.         self.FadeLength = 0.2 --See https://www.desmos.com/calculator/hg5h4fpfim
  808.         self.ContractFrom = 0.5 --Parts shorten or grow once their Transparency exceeds this value. Set to a value above 1 to turn effect off. See https://imgur.com/OChA441
  809.  
  810.         --Bolt Color Properties--
  811.         self.Color = Color3.new(1, 1, 1) --Can be a Color3 or ColorSequence
  812.         self.ColorOffsetSpeed = 1 --Sets speed at which ColorSequence travels along Bolt
  813.  
  814.         --
  815.  
  816.         self.Parts = {} --The BoltParts which make up the Bolt
  817.  
  818.  
  819.         local a0, a1 = Attachment0, Attachment1
  820.         local parent = sc.EffectModel
  821.         local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*self.CurveSize0, a1.WorldPosition - a1.WorldAxis*self.CurveSize1, a1.WorldPosition
  822.         local PrevPoint, bezier0 = p0, p0
  823.         local MainBranchN = PartCount or 30
  824.  
  825.         for i = 1, MainBranchN do
  826.             local t1 = i/MainBranchN
  827.             local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
  828.             local NextPoint = i ~= MainBranchN and (CFrame.lookAt(bezier0, bezier1)).Position or bezier1
  829.             local BPart = BoltPart:Clone()
  830.             BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, 0, 0)
  831.             BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
  832.             BPart.Parent = parent
  833.             BPart.Locked, BPart.CastShadow = true, false
  834.             self.Parts[i] = BPart
  835.             PrevPoint, bezier0 = NextPoint, bezier1
  836.         end
  837.  
  838.         self.PartsHidden = false
  839.         self.DisabledTransparency = 1
  840.         self.StartT = clock()
  841.         self.RanNum = math.random()*100
  842.         self.RefIndex = #ActiveBranches + 1
  843.  
  844.         ActiveBranches[self.RefIndex] = self
  845.  
  846.         return self
  847.     end
  848.  
  849.     function LightningBolt:Destroy()
  850.         ActiveBranches[self.RefIndex] = nil
  851.  
  852.         for i = 1, #self.Parts do
  853.             self.Parts[i]:Destroy()
  854.  
  855.             if i%100 == 0 then wait() end
  856.         end
  857.  
  858.         self = nil
  859.     end
  860.  
  861.     local offsetAngle = math.cos(math.rad(90))
  862.  
  863.     game:GetService("RunService").Heartbeat:Connect(function()
  864.  
  865.         for _, ThisBranch in pairs(ActiveBranches) do
  866.             if ThisBranch.Enabled == true then
  867.                 ThisBranch.PartsHidden = false
  868.                 local MinOpa, MaxOpa = 1 - ThisBranch.MaxTransparency, 1 - ThisBranch.MinTransparency
  869.                 local MinRadius, MaxRadius = ThisBranch.MinRadius, ThisBranch.MaxRadius
  870.                 local thickness = ThisBranch.Thickness
  871.                 local Parts = ThisBranch.Parts
  872.                 local PartsN = #Parts
  873.                 local RanNum = ThisBranch.RanNum
  874.                 local StartT = ThisBranch.StartT
  875.                 local spd = ThisBranch.AnimationSpeed
  876.                 local freq = ThisBranch.Frequency
  877.                 local MinThick, MaxThick = ThisBranch.MinThicknessMultiplier, ThisBranch.MaxThicknessMultiplier
  878.                 local a0, a1, CurveSize0, CurveSize1 = ThisBranch.Attachment0, ThisBranch.Attachment1, ThisBranch.CurveSize0, ThisBranch.CurveSize1
  879.                 local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition + a0.WorldAxis*CurveSize0, a1.WorldPosition - a1.WorldAxis*CurveSize1, a1.WorldPosition
  880.                 local timePassed = clock() - StartT
  881.                 local PulseLength, PulseSpeed, FadeLength = ThisBranch.PulseLength, ThisBranch.PulseSpeed, ThisBranch.FadeLength
  882.                 local Color = ThisBranch.Color
  883.                 local ColorOffsetSpeed = ThisBranch.ColorOffsetSpeed
  884.                 local contractf = 1 - ThisBranch.ContractFrom
  885.                 local PrevPoint, bezier0 = p0, p0
  886.  
  887.                 if timePassed < (PulseLength + 1) / PulseSpeed then
  888.  
  889.                     for i = 1, PartsN do
  890.                         --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
  891.                         local BPart = Parts[i]
  892.                         local t1 = i/PartsN
  893.                         local Opacity = DiscretePulse(t1, PulseSpeed, PulseLength, FadeLength, timePassed, MinOpa, MaxOpa)
  894.                         local bezier1 = CubicBezier(p0, p1, p2, p3, t1)
  895.                         local time = -timePassed --minus to ensure bolt waves travel from a0 to a1
  896.                         local input, input2 = (spd*time) + freq*10*t1 - 0.2 + RanNum*4, 5*((spd*0.01*time) / 10 + freq*t1) + RanNum*4
  897.                         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)
  898.                         local noise1 = NoiseBetween(3.4, input2, input, MinRadius, MaxRadius)*math.exp(-5000*(t1 - 0.5)^10)
  899.                         local thicknessNoise = NoiseBetween(2.3, input2, input, MinThick, MaxThick)
  900.                         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
  901.  
  902.                         if Opacity > contractf then
  903.                             BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
  904.                             BPart.CFrame = CFrame.lookAt(0.5*(PrevPoint + NextPoint), NextPoint)*xInverse
  905.                             BPart.Transparency = 1 - Opacity
  906.                         elseif Opacity > contractf - 1/(PartsN*FadeLength) then
  907.                             local interp = (1 - (Opacity - (contractf - 1/(PartsN*FadeLength)))*PartsN*FadeLength)*(t1 < timePassed*PulseSpeed - 0.5*PulseLength and 1 or -1)
  908.                             BPart.Size = Vector3.new((1 - math.abs(interp))*(NextPoint - PrevPoint).Magnitude, thickness*thicknessNoise*Opacity, thickness*thicknessNoise*Opacity)
  909.                             BPart.CFrame = CFrame.lookAt(PrevPoint + (NextPoint - PrevPoint)*(math.max(0, interp) + 0.5*(1 - math.abs(interp))), NextPoint)*xInverse
  910.                             BPart.Transparency = 1 - Opacity
  911.                         else
  912.                             BPart.Transparency = 1
  913.                         end
  914.  
  915.                         if typeof(Color) == "Color3" then
  916.                             BPart.Color = Color
  917.                         else --ColorSequence
  918.                             t1 = (RanNum + t1 - timePassed*ColorOffsetSpeed)%1
  919.                             local keypoints = Color.Keypoints
  920.                             for i = 1, #keypoints - 1 do --convert colorsequence onto lightning
  921.                                 if keypoints[i].Time < t1 and t1 < keypoints[i+1].Time then
  922.                                     BPart.Color = keypoints[i].Value:lerp(keypoints[i+1].Value, (t1 - keypoints[i].Time)/(keypoints[i+1].Time - keypoints[i].Time))
  923.                                     break
  924.                                 end
  925.                             end
  926.                         end
  927.  
  928.                         PrevPoint, bezier0 = NextPoint, bezier1
  929.                     end
  930.  
  931.                 else
  932.  
  933.                     ThisBranch:Destroy()
  934.  
  935.                 end
  936.  
  937.             else --Enabled = false
  938.  
  939.                 if ThisBranch.PartsHidden == false then
  940.                     ThisBranch.PartsHidden = true
  941.                     local datr = ThisBranch.DisabledTransparency
  942.                     for i = 1, #ThisBranch.Parts do
  943.                         ThisBranch.Parts[i].Transparency = datr
  944.                     end
  945.                 end
  946.  
  947.             end
  948.         end
  949.  
  950.     end)
  951.  
  952.     return LightningBolt
  953. end)()
  954.  
  955. local LightningModuleSparks = (function()
  956.     --Adds sparks effect to a Lightning Bolt
  957.     local LightningBolt = LightningModule
  958.  
  959.     local ActiveSparks = {}
  960.  
  961.  
  962.     local rng = Random.new()
  963.     local LightningSparks = {}
  964.     LightningSparks.__index = LightningSparks
  965.  
  966.     function LightningSparks.new(LightningBolt, MaxSparkCount)
  967.         local self = setmetatable({}, LightningSparks)
  968.  
  969.         --Main (default) properties--
  970.  
  971.         self.Enabled = true --Stops spawning sparks when false
  972.         self.LightningBolt = LightningBolt --Bolt which sparks fly out of
  973.         self.MaxSparkCount = MaxSparkCount or 10 --Max number of sparks visible at any given instance
  974.         self.MinSpeed, self.MaxSpeed = 3, 6 --Min and max PulseSpeeds of sparks
  975.         self.MinDistance, self.MaxDistance = 3, 6 --Governs how far sparks travel away from main bolt
  976.         self.MinPartsPerSpark, self.MaxPartsPerSpark = 8, 10 --Adjustable
  977.  
  978.         --
  979.  
  980.         self.SparksN = 0
  981.         self.SlotTable = {}
  982.         self.RefIndex = #ActiveSparks + 1
  983.  
  984.         ActiveSparks[self.RefIndex] = self
  985.  
  986.         return self
  987.     end
  988.  
  989.     function LightningSparks:Destroy()
  990.         ActiveSparks[self.RefIndex] = nil
  991.  
  992.         for i, v in pairs(self.SlotTable) do
  993.             if v.Parts[1].Parent == nil then
  994.                 self.SlotTable[i] = nil --Removes reference to prevent memory leak
  995.             end
  996.         end
  997.  
  998.         self = nil
  999.     end
  1000.  
  1001.     local function RandomVectorOffset(v, maxAngle) --returns uniformly-distributed random unit vector no more than maxAngle radians away from v
  1002.         return (CFrame.lookAt(Vector3.new(), v)*CFrame.Angles(0, 0, rng:NextNumber(0, 2*math.pi))*CFrame.Angles(math.acos(rng:NextNumber(math.cos(maxAngle), 1)), 0, 0)).LookVector
  1003.     end
  1004.  
  1005.     game:GetService("RunService").Heartbeat:Connect(function ()
  1006.  
  1007.         for _, ThisSpark in pairs(ActiveSparks) do
  1008.  
  1009.             if ThisSpark.Enabled == true and ThisSpark.SparksN < ThisSpark.MaxSparkCount then
  1010.  
  1011.                 local Bolt = ThisSpark.LightningBolt
  1012.  
  1013.                 if Bolt.Parts[1].Parent == nil then
  1014.                     ThisSpark:Destroy()
  1015.                     return
  1016.                 end
  1017.  
  1018.                 local BoltParts = Bolt.Parts
  1019.                 local BoltPartsN = #BoltParts
  1020.  
  1021.                 local opaque_parts = {}
  1022.  
  1023.                 for part_i = 1, #BoltParts do --Fill opaque_parts table
  1024.  
  1025.                     if BoltParts[part_i].Transparency < 0.3 then --minimum opacity required to be able to generate a spark there
  1026.                         opaque_parts[#opaque_parts + 1] = (part_i - 0.5) / BoltPartsN
  1027.                     end
  1028.  
  1029.                 end
  1030.  
  1031.                 local minSlot, maxSlot
  1032.  
  1033.                 if #opaque_parts ~= 0 then
  1034.                     minSlot, maxSlot = math.ceil(opaque_parts[1]*ThisSpark.MaxSparkCount), math.ceil(opaque_parts[#opaque_parts]*ThisSpark.MaxSparkCount)
  1035.                 end
  1036.  
  1037.                 for _ = 1, rng:NextInteger(1, ThisSpark.MaxSparkCount - ThisSpark.SparksN) do
  1038.  
  1039.                     if #opaque_parts == 0 then break end
  1040.  
  1041.                     local available_slots = {}
  1042.  
  1043.                     for slot_i = minSlot, maxSlot do --Fill available_slots table
  1044.  
  1045.                         if ThisSpark.SlotTable[slot_i] == nil then --check slot doesn't have existing spark
  1046.                             available_slots[#available_slots + 1] = slot_i
  1047.                         end
  1048.  
  1049.                     end
  1050.  
  1051.                     if #available_slots ~= 0 then
  1052.  
  1053.                         local ChosenSlot = available_slots[rng:NextInteger(1, #available_slots)]
  1054.                         local localTrng = rng:NextNumber(-0.5, 0.5)
  1055.                         local ChosenT = (ChosenSlot - 0.5 + localTrng)/ThisSpark.MaxSparkCount
  1056.  
  1057.                         local dist, ChosenPart = 10, 1
  1058.  
  1059.                         for opaque_i = 1, #opaque_parts do
  1060.                             local testdist = math.abs(opaque_parts[opaque_i] - ChosenT)
  1061.                             if testdist < dist then
  1062.                                 dist, ChosenPart = testdist, math.floor((opaque_parts[opaque_i]*BoltPartsN + 0.5) + 0.5)
  1063.                             end
  1064.                         end
  1065.  
  1066.                         local Part = BoltParts[ChosenPart]
  1067.  
  1068.                         --Make new spark--
  1069.  
  1070.                         local A1, A2 = {}, {}
  1071.                         A1.WorldPosition = Part.Position + localTrng*Part.CFrame.RightVector*Part.Size.X
  1072.                         A2.WorldPosition = A1.WorldPosition + RandomVectorOffset(Part.CFrame.RightVector, math.pi/4)*rng:NextNumber(ThisSpark.MinDistance, ThisSpark.MaxDistance)
  1073.                         A1.WorldAxis = (A2.WorldPosition - A1.WorldPosition).Unit
  1074.                         A2.WorldAxis = A1.WorldAxis
  1075.                         local NewSpark = LightningBolt.new(A1, A2, rng:NextInteger(ThisSpark.MinPartsPerSpark, ThisSpark.MaxPartsPerSpark))
  1076.  
  1077.                         --NewSpark.MaxAngleOffset = math.rad(70)
  1078.                         NewSpark.MinRadius, NewSpark.MaxRadius = 0, 0.8
  1079.                         NewSpark.AnimationSpeed = .4
  1080.                         NewSpark.Thickness = Part.Size.Y / 2
  1081.                         NewSpark.MinThicknessMultiplier, NewSpark.MaxThicknessMultiplier = 1, 1
  1082.                         NewSpark.PulseLength = 0.5
  1083.                         NewSpark.PulseSpeed = rng:NextNumber(ThisSpark.MinSpeed, ThisSpark.MaxSpeed)
  1084.                         NewSpark.FadeLength = 0.25
  1085.                         local cH, cS, cV = Color3.toHSV(Part.Color)
  1086.                         NewSpark.Color = Color3.fromHSV(cH, 0.6, cV)
  1087.  
  1088.                         ThisSpark.SlotTable[ChosenSlot] = NewSpark
  1089.  
  1090.                         --
  1091.  
  1092.                     end
  1093.  
  1094.                 end
  1095.  
  1096.             end
  1097.  
  1098.  
  1099.  
  1100.             --Update SparksN--
  1101.  
  1102.             local slotsInUse = 0
  1103.  
  1104.             for i, v in pairs(ThisSpark.SlotTable) do
  1105.                 if v.Parts[1].Parent ~= nil then
  1106.                     slotsInUse = slotsInUse + 1
  1107.                 else
  1108.                     ThisSpark.SlotTable[i] = nil --Removes reference to prevent memory leak
  1109.                 end
  1110.             end
  1111.  
  1112.             ThisSpark.SparksN = slotsInUse
  1113.  
  1114.             --
  1115.         end
  1116.  
  1117.     end)
  1118.  
  1119.     return LightningSparks
  1120. end)()
  1121.  
  1122. function sc:Lightning(Part0, Part1, Times, Offset, Color, Thickness)
  1123.     local Tabl = {}
  1124.     local magz = (Part0 - Part1).magnitude
  1125.     local curpos = Part0
  1126.     local lightningparts = {}
  1127.     local trz = {
  1128.         -Offset,
  1129.         Offset
  1130.     }
  1131.     if(Times <= 1)then
  1132.         Times = math.clamp(math.floor(magz/(5+(Thickness*2))),1,100)
  1133.     end
  1134.     if Times > 5 then
  1135.         local sp = Instance.new('Part',self.EffectModel)
  1136.         sp.Position = Part0
  1137.         sp.Anchored = true
  1138.         sp.Transparency = 1
  1139.         sp.CanCollide = false
  1140.         local sn = Instance.new('Sound',sp)
  1141.         sn.SoundId = "rbxassetid://"..821439273
  1142.         sn.Volume = Times/6
  1143.         sn.Pitch = math.random(50,150)/100
  1144.         sn.PlayOnRemove = true
  1145.         sn:Destroy()
  1146.         game:GetService('Debris'):AddItem(sp, 0.01)
  1147.     end
  1148.     if Times >= 20 then
  1149.         local sp = Instance.new('Part',self.EffectModel)
  1150.         sp.Position = Part1
  1151.         sp.Anchored = true
  1152.         sp.Transparency = 1
  1153.         sp.CanCollide = false
  1154.         local sn = Instance.new('Sound',sp)
  1155.         sn.SoundId = "rbxassetid://"..821439273
  1156.         sn.Volume = Times/6
  1157.         sn.Pitch = math.random(50,150)/100
  1158.         sn.PlayOnRemove = true
  1159.         sn:Destroy()
  1160.         game:GetService('Debris'):AddItem(sp, 0.01)
  1161.     end
  1162.     local ranCF = CFrame.fromAxisAngle((Part1 - Part0).Unit, (math.random(-100,100)/100)*math.pi)
  1163.     local A1, A2 = {}, {}
  1164.  
  1165.     A1.WorldPosition, A1.WorldAxis = Part0, ranCF*Vector3.new(1,1,1)
  1166.     A2.WorldPosition, A2.WorldAxis = Part1, ranCF*Vector3.new(1,1,1)
  1167.  
  1168.     local NewBolt = LightningModule.new(A1, A2, Times)
  1169.     NewBolt.CurveSize0 = Offset/2 * (Times/4)
  1170.     NewBolt.PulseSpeed = 5/math.clamp(Times/5, 1, 5)
  1171.     NewBolt.PulseLength = 1
  1172.     NewBolt.FadeLength = 0.25
  1173.     NewBolt.Thickness = Thickness
  1174.     NewBolt.Color = ColorSequence.new({
  1175.         ColorSequenceKeypoint.new(0, Color),
  1176.         ColorSequenceKeypoint.new(1, Color3.new(Color.R/2,Color.G/2,Color.B/2))
  1177.     })
  1178.  
  1179.     local NewSparks = LightningModuleSparks.new(NewBolt, 3)
  1180.     NewSparks.MinPartsPerSpark = 3
  1181.     NewSparks.MaxPartsPerSpark = math.clamp(5+math.ceil(Times), 5, 30)
  1182.     NewSparks.MinDistance = 1
  1183.     NewSparks.MaxDistance = math.clamp(Times/3, 1, 10)
  1184. end
  1185.  
  1186. function getNumberOfPartsInModel(model)
  1187.     local a = 0
  1188.     for i,v in next, model:GetDescendants() do
  1189.         if(v:IsA("BasePart"))then
  1190.             a += 1
  1191.         end
  1192.     end
  1193.     return a
  1194. end
  1195.  
  1196. function IsPointInVolume(point: Vector3, volumeCenter: CFrame, volumeSize: Vector3): boolean
  1197.     local volumeSpacePoint = volumeCenter:PointToObjectSpace(point)
  1198.     return volumeSpacePoint.X >= -volumeSize.X/2
  1199.         and volumeSpacePoint.X <= volumeSize.X/2
  1200.         and volumeSpacePoint.Y >= -volumeSize.Y/2
  1201.         and volumeSpacePoint.Y <= volumeSize.Y/2
  1202.         and volumeSpacePoint.Z >= -volumeSize.Z/2
  1203.         and volumeSpacePoint.Z <= volumeSize.Z/2
  1204. end
  1205.  
  1206. function GetClosestPoint(part : BasePart, vector : Vector3) : Vector3
  1207.     local closestPoint = part.CFrame:PointToObjectSpace(vector)
  1208.     local size = part.Size / 2
  1209.     closestPoint = Vector3.new(
  1210.         math.clamp(closestPoint.x, -size.x, size.x),
  1211.         math.clamp(closestPoint.y, -size.y, size.y),
  1212.         math.clamp(closestPoint.z, -size.z, size.z)
  1213.     )
  1214.     return part.CFrame:PointToWorldSpace(closestPoint)
  1215. end
  1216.  
  1217. function sc.isDescendantOfIgnores(obj)
  1218.     for i,v in next, sc.Ignore do
  1219.         if(obj:IsDescendantOf(v) or obj == v)then
  1220.             return true
  1221.         end
  1222.     end
  1223.     return false
  1224. end
  1225.  
  1226. function Aoe(Position, Range)
  1227.     local Descendants = workspace:GetDescendants()
  1228.     local parts = {}
  1229.     for i = 1, #Descendants do
  1230.         local Object = Descendants[i]
  1231.         if Object ~= workspace and not Object:IsA("Terrain") and Object:IsA("BasePart") then
  1232.             local ClosestPoint = GetClosestPoint(Object, (typeof(Position) == "CFrame" and Position.Position or Position))
  1233.             local Magnitude = (Object.Position - (typeof(Position) == "CFrame" and Position.Position or Position)).Magnitude
  1234.             if IsPointInVolume(ClosestPoint, (typeof(Position) == "Vector3" and CFrame.new(Position.X,Position.Y,Position.Z) or Position), (typeof(Range) ~= "Vector3" and Vector3.new(Range,Range,Range) or Range)) then
  1235.                 table.insert(parts, Object)
  1236.             end
  1237.         end
  1238.     end
  1239.     return parts
  1240. end
  1241.  
  1242. local LastShatter = tick()
  1243. local ShatterDebounceTime = 0.5
  1244. local Decimated = {}
  1245.  
  1246. function AddToDecimateTable(Object)
  1247.     local ShouldCheck = {
  1248.         "Size",
  1249.         "Color",
  1250.         "Shape",
  1251.         "Name",
  1252.         "Position",
  1253.         "MeshId",
  1254.         "MeshID",
  1255.         "TextureId",
  1256.         "TextureID",
  1257.         "ClassName"
  1258.     }
  1259.     local tbl = {}
  1260.     for i, v in next, ShouldCheck do
  1261.         local succ, returned = pcall(function()
  1262.             return Object[v]
  1263.         end)
  1264.         if(succ)then
  1265.             tbl[v] = returned
  1266.         end
  1267.     end
  1268.     tbl["NumOfDescendants"] = #Object:GetDescendants()
  1269.     if(Object:FindFirstChildOfClass("SpecialMesh"))then
  1270.         tbl["SpecialMeshId"] = Object:FindFirstChildOfClass("SpecialMesh").MeshId
  1271.         tbl["SpecialMeshType"] = Object:FindFirstChildOfClass("SpecialMesh").MeshType
  1272.     end
  1273.     tbl.self = Object
  1274.     table.insert(Decimated, tbl)
  1275. end
  1276.  
  1277. function DoDecimateCheck(Object)
  1278.     local matches = 0
  1279.     local alreadyChecked = {}
  1280.     pcall(function()
  1281.         sc.UpdateIgnore()
  1282.     end)
  1283.     if(sc.isDescendantOfIgnores(Object))then
  1284.         return false, 0
  1285.     end
  1286.     for i, v in next, Decimated do
  1287.         for index, value in next, v do
  1288.             if(not table.find(alreadyChecked, index))then
  1289.                 pcall(function()
  1290.                     local succ, matched = pcall(function()
  1291.                         if(Object[index] == value)then
  1292.                             return true
  1293.                         end
  1294.                     end)
  1295.                     if(succ)and(matched)then
  1296.                         matches += 1
  1297.                     end
  1298.                     pcall(function()
  1299.                         if(index == "Size")and(not matched)then
  1300.                             if(Object[index] - value) <= .3 then
  1301.                                 matches += 1
  1302.                                 matched = true
  1303.                             end
  1304.                         end
  1305.                     end)
  1306.                     pcall(function()
  1307.                         if(index == "Position")and(not matched)then
  1308.                             if(Object[index] - value).Magnitude <= 5 then
  1309.                                 Decimated[i][index] = Object[index]
  1310.                                 matches += 1
  1311.                                 matched = true
  1312.                             end
  1313.                         end
  1314.                     end)
  1315.                     if(index == "NumOfDescendants")then
  1316.                         if(value == #Object:GetDescendants())then
  1317.                             matches += 1
  1318.                             matched = true
  1319.                         end
  1320.                     end
  1321.                     pcall(function()
  1322.                         if(tostring(index):find("SpecialMesh"))then
  1323.                             if(Object:FindFirstChildOfClass("SpecialMesh"))then
  1324.                                 if(Object:FindFirstChildOfClass("SpecialMesh")[string.gsub(tostring(index), "Special", '')] == value)then
  1325.                                     matches += 1
  1326.                                     matched = true
  1327.                                 end
  1328.                             end
  1329.                         end
  1330.                     end)
  1331.                     if(matched)then
  1332.                         table.insert(alreadyChecked, index)
  1333.                     end
  1334.                 end)
  1335.             end
  1336.         end
  1337.     end
  1338.     return matches >= 5, matches
  1339. end
  1340.  
  1341. sc.DecimateMethods = {
  1342.     [1] = {
  1343.         Name = "Destroy",
  1344.         Function = function(v)
  1345.             pcall(game.Destroy, v)
  1346.         end,
  1347.     },
  1348.     [2] = {
  1349.         Name = "CFrame Kill",
  1350.         Function = function(v)
  1351.             local function Kill(b)
  1352.                 b.CFrame = CFrame.new(99e9,99e9,99e9)
  1353.                 local changed
  1354.                 changed = b.Changed:Connect(function()
  1355.                     if(not v:IsDescendantOf(game))then
  1356.                         changed:Disconnect()
  1357.                         return
  1358.                     end
  1359.                     b.CFrame = CFrame.new(99e9,99e9,99e9)
  1360.                 end)
  1361.             end
  1362.             if(v:IsA("Model"))then
  1363.                 for i,b in next, v:GetDescendants() do
  1364.                     if(b:IsA("BasePart"))then
  1365.                         Kill(b)
  1366.                     end
  1367.                 end
  1368.             else
  1369.                 Kill(v)
  1370.                 for i,b in next, v:GetDescendants() do
  1371.                     if(b:IsA("BasePart"))then
  1372.                         Kill(b)
  1373.                     end
  1374.                 end
  1375.             end
  1376.         end,
  1377.     }
  1378. }
  1379.  
  1380. function sc.DecimateCheck(object)
  1381.     local self = sc
  1382.     pcall(function()
  1383.         self.UpdateIgnore()
  1384.     end)
  1385.     if(self.isDescendantOfIgnores(object))then
  1386.         return
  1387.     end
  1388.     local function check(v)
  1389.         local matched, matches = DoDecimateCheck(v)
  1390.         if(v:IsA("Model"))then
  1391.             if(matches >= 2)then
  1392.                 self.DecimateMethods[self.DecimateMethod].Function(v)
  1393.             end
  1394.         else
  1395.             if(matched)then
  1396.                 self.DecimateMethods[self.DecimateMethod].Function(v)
  1397.             end
  1398.         end
  1399.     end
  1400.     pcall(check, object)
  1401.     task.defer(check, object)
  1402. end
  1403.  
  1404. sc.KillMethods = {
  1405.     [1] = {
  1406.         Name = "Shatter",
  1407.         Function = function(v, m)
  1408.             local maxparts = 50
  1409.             if(m)then
  1410.                 if(m:IsDescendantOf(game) and m)then
  1411.                     if(getNumberOfPartsInModel(m) <= maxparts)then
  1412.                         if((tick() - LastShatter)>=ShatterDebounceTime)then
  1413.                             sc:Shatter(m)
  1414.                             LastShatter = tick()
  1415.                         end
  1416.                         pcall(game.Destroy, m)
  1417.                     else
  1418.                         pcall(game.Destroy, m)
  1419.                     end
  1420.                 end
  1421.             else
  1422.                 if(v:IsDescendantOf(game) and v)then
  1423.                     if(getNumberOfPartsInModel(v) <= maxparts)then
  1424.                         if((tick() - LastShatter)>=ShatterDebounceTime)then
  1425.                             sc:Shatter(v)
  1426.                             LastShatter = tick()
  1427.                         end
  1428.                         pcall(game.Destroy, v)
  1429.                     else
  1430.                         pcall(game.Destroy, v)
  1431.                     end
  1432.                 end
  1433.             end
  1434.         end,
  1435.     },
  1436.     [2] = {
  1437.         Name = "Destroy",
  1438.         Function = function(v, m)
  1439.             pcall(game.Destroy, m or v)
  1440.         end,
  1441.     },
  1442.     [3] = {
  1443.         Name = "CFrame Kill",
  1444.         Function = function(v, m)
  1445.             local function Kill(b)
  1446.                 b.CFrame = CFrame.new(99e9,99e9,99e9)
  1447.                 local changed
  1448.                 changed = b.Changed:Connect(function()
  1449.                     if(not v:IsDescendantOf(game))then
  1450.                         changed:Disconnect()
  1451.                         return
  1452.                     end
  1453.                     b.CFrame = CFrame.new(99e9,99e9,99e9)
  1454.                 end)
  1455.             end
  1456.             if(m)then
  1457.                 for i,b in next, m:GetDescendants() do
  1458.                     if(b:IsA("BasePart"))then
  1459.                         Kill(b)
  1460.                     end
  1461.                 end
  1462.             else
  1463.                 Kill(v)
  1464.                 for i,b in next, v:GetDescendants() do
  1465.                     if(b:IsA("BasePart"))then
  1466.                         Kill(b)
  1467.                     end
  1468.                 end
  1469.             end
  1470.         end,
  1471.     },
  1472.     [4] = {
  1473.         Name = "Character Eliminate",
  1474.         Function = function(v, m)
  1475.             if(m)then
  1476.                 if(m:IsDescendantOf(game))then
  1477.                     if(m:IsA("Model") and game:GetService("Players"):GetPlayerFromCharacter(m))then
  1478.                         table.insert(sc.DecimateConnections, game:GetService("Players"):GetPlayerFromCharacter(m).CharacterAdded:Connect(game.Destroy))
  1479.                     end
  1480.                     pcall(game.Destroy, m)
  1481.                 end
  1482.             end
  1483.         end,
  1484.     },
  1485.     [5] = {
  1486.         Name = "Exterminate.",
  1487.         Function = function(v, m)
  1488.             if(m)then
  1489.                 if(m:IsDescendantOf(game))then
  1490.                     if(m:IsA("Model") and game:GetService("Players"):GetPlayerFromCharacter(m))then
  1491.                         table.insert(sc.DecimateConnections, game:GetService("Players"):GetPlayerFromCharacter(m).CharacterAdded:Connect(function(c)
  1492.                             pcall(sc.DecimateMethods[sc.DecimateMethod].Function, c)
  1493.                             task.defer(pcall, sc.DecimateMethods[sc.DecimateMethod].Function, c)
  1494.                         end))
  1495.                     end
  1496.                     AddToDecimateTable(m)
  1497.                     sc.DecimateMethods[sc.DecimateMethod].Function(m)
  1498.                     for i,v in next, workspace:GetDescendants() do
  1499.                         sc.UpdateIgnore()
  1500.                         if(not sc.isDescendantOfIgnores(v))then
  1501.                             pcall(function()
  1502.                                 sc.DecimateCheck(v)
  1503.                             end)
  1504.                         end
  1505.                     end
  1506.                 end
  1507.             else
  1508.                 if(v:IsDescendantOf(game))then
  1509.                     AddToDecimateTable(v)
  1510.                     sc.DecimateMethods[sc.DecimateMethod].Function(v)
  1511.                     for i,v in next, workspace:GetDescendants() do
  1512.                         sc.UpdateIgnore()
  1513.                         if(not sc.isDescendantOfIgnores(v))then
  1514.                             pcall(function()
  1515.                                 sc.DecimateCheck(v)
  1516.                             end)
  1517.                         end
  1518.                     end
  1519.                 end
  1520.             end
  1521.         end
  1522.     }
  1523. }
  1524.  
  1525. sc.RefitMethods = {
  1526.     "Normal",
  1527.     "LagIsTheBestDefense"
  1528. }
  1529.  
  1530. function sc:Aoe(Position, Range)
  1531.     local success, parts = pcall(function()
  1532.         if(self.ClientAoe)then
  1533.             return self.RemoteFunction:InvokeClient(self:GetCurrentPlayer(), "Aoe", {
  1534.                 Position,
  1535.                 Range
  1536.             })
  1537.         else
  1538.             return Aoe(Position, Range)
  1539.         end
  1540.     end)
  1541.     if(not success)then
  1542.         parts = {}
  1543.     end
  1544.     task.spawn(function()
  1545.         for i,v in next, parts do
  1546.             pcall(function()
  1547.                 self.UpdateIgnore()
  1548.                 if(not self.isDescendantOfIgnores(v))then
  1549.                     if(v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base")then
  1550.                         local m = v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel")
  1551.                         if(m)then
  1552.                             if(m:IsDescendantOf(game))then
  1553.                                 chatfunc(sc.KillTexts[math.random(1,#sc.KillTexts)]..m.Name)
  1554.                             end
  1555.                         else
  1556.                             if(v:IsDescendantOf(game))then
  1557.                                 chatfunc(sc.KillTexts[math.random(1,#sc.KillTexts)]..v.Name)
  1558.                             end
  1559.                         end
  1560.                         if(self.KillMethods[self.KillMethod])then
  1561.                             self.KillMethods[self.KillMethod].Function(v, m)
  1562.                         end
  1563.                     end
  1564.                 end
  1565.             end)
  1566.         end
  1567.     end)
  1568.     return parts
  1569. end
  1570.  
  1571. function sc:CleanObject(obj,keep)
  1572.     local function clean(v)
  1573.         if v:IsA("DataModelMesh") and not table.find(keep,"SpecialMesh") then
  1574.             v:Destroy()
  1575.         elseif v:IsA("MeshPart") and not table.find(keep,"MeshPart") then
  1576.             local a = Instance.new("Part", v.Parent)
  1577.             a.Name = v.Name
  1578.             a.Size = v.Size
  1579.             a.CFrame = v.CFrame
  1580.             a.Material = v.Material
  1581.             a.Color = v.Color
  1582.             a.Transparency = v.Transparency
  1583.             a.Anchored = v.Anchored
  1584.             a.CanCollide = v.CanCollide
  1585.             a.CanQuery = v.CanQuery
  1586.             a.Parent = v.Parent
  1587.             pcall(game.Destroy,v)
  1588.         elseif v:IsA("UnionOperation") and not table.find(keep,"UnionOperation")then
  1589.             local a = Instance.new("Part", v.Parent)
  1590.             a.Name = v.Name
  1591.             a.Size = v.Size
  1592.             a.CFrame = v.CFrame
  1593.             a.Material = v.Material
  1594.             a.Color = v.Color
  1595.             a.Transparency = v.Transparency
  1596.             a.Anchored = v.Anchored
  1597.             a.CanCollide = v.CanCollide
  1598.             a.CanQuery = v.CanQuery
  1599.             a.Parent = v.Parent
  1600.             pcall(game.Destroy,v)
  1601.         elseif v:IsA("Sound") and not table.find(keep,"Sound") then
  1602.             v.PlayOnRemove = false
  1603.             v:Destroy()
  1604.         elseif v:IsA("Decal") and not table.find(keep,"Decal") then
  1605.             v:Destroy()
  1606.         elseif v:IsA("JointInstance") and not table.find(keep,"JointInstance") then
  1607.             v:Destroy()
  1608.         elseif v:IsA("Script") and not table.find(keep,"Script") then
  1609.             v.Disabled = true
  1610.             v:Destroy()
  1611.         elseif v:IsA("LocalScript") and not table.find(keep,"LocalScript") then
  1612.             v.Disabled = true
  1613.             v:Destroy()
  1614.         elseif v:IsA("ModuleScript") and not table.find(keep,"ModuleScript") then
  1615.             v:Destroy()
  1616.         elseif v:IsA("Attachment") and not table.find(keep,"Attachment") then
  1617.             v:Destroy()
  1618.         elseif v:IsA("ParticleEmitter") and not table.find(keep,"ParticleEmitter") then
  1619.             v:Destroy()
  1620.         elseif v:IsA("PointLight") and not table.find(keep,"PointLight") then
  1621.             v:Destroy()
  1622.         elseif(v:IsA("GuiObject") and not table.find(keep, "GuiObject"))then
  1623.             v:Destroy()
  1624.         end
  1625.     end
  1626.     clean(obj)
  1627.     for i,v in next, obj:GetDescendants() do
  1628.         clean(v)
  1629.     end
  1630. end
  1631.  
  1632. function sc:Shatter(p) --thx WomanMalder UwU
  1633.     local function isdestroyed(inst)
  1634.         if (inst.Parent ~= nil) then return (false) end
  1635.         local _, b = pcall(function()
  1636.             inst.Parent = inst
  1637.         end)
  1638.         if(b:match('locked'))then
  1639.             return (true)
  1640.         else
  1641.             return (false)
  1642.         end
  1643.     end;
  1644.  
  1645.     local function Subtract(Part:BasePart,Negation:{Instance}|Instance,CollisionFidelity:Enum.CollisionFidelity|nil)
  1646.         if(CollisionFidelity==nil)then CollisionFidelity = 'Hull' end
  1647.         if(typeof(Negation)=='table')then
  1648.             for o, p in next, Negation do
  1649.                 if (p:IsDescendantOf(workspace)) then
  1650.                 else
  1651.                     return
  1652.                 end
  1653.             end
  1654.             return(Part:SubtractAsync(Negation, CollisionFidelity));
  1655.         else
  1656.             if(Part:IsDescendantOf(workspace))then
  1657.                 return(Part:SubtractAsync({Negation}, CollisionFidelity));
  1658.             end
  1659.         end
  1660.     end;
  1661.  
  1662.     local function Fragment(Part, Count)
  1663.         local Fragments = {};
  1664.         local partSize = Part.Size;
  1665.         local partCF = Part.CFrame;
  1666.  
  1667.         if(Part:IsDescendantOf(workspace) and Count >= 0)then
  1668.             local c1 = Instance.new('Part')
  1669.             c1.Size = partSize*4
  1670.             c1.CFrame = partCF * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) * CFrame.new(0, -partSize.Y * 2, 0)
  1671.             local c2 = c1:Clone()
  1672.             c2.CFrame = partCF * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) * CFrame.new(0, partSize.Y * 2, 0)
  1673.             local p1, p2
  1674.             pcall(function()
  1675.                 p1 = Subtract(Part, c1)
  1676.                 p2 = Subtract(Part, c2)
  1677.             end)
  1678.             if(p1 and p2) then
  1679.                 p1.CFrame = partCF * partCF:ToObjectSpace(p1.CFrame)
  1680.                 p2.CFrame = partCF * partCF:ToObjectSpace(p2.CFrame)
  1681.                 p1.Parent = Part.Parent
  1682.                 p2.Parent = Part.Parent
  1683.                 local f1 = Fragment(p1, Count-1)
  1684.                 local f2 = Fragment(p2, Count-1)
  1685.                 table.insert(Fragments, p1)
  1686.                 table.insert(Fragments, p2)
  1687.                 for i, v in next, f1 do
  1688.                     table.insert(Fragments, v)
  1689.                 end
  1690.                 for i, v in next, f2 do
  1691.                     table.insert(Fragments, v)
  1692.                 end
  1693.             end
  1694.         end
  1695.         for i, v in next, Fragments do
  1696.             v.Parent = nil
  1697.         end
  1698.         if(#Fragments == 0) then
  1699.             Fragments = {Part:Clone()}
  1700.         end
  1701.         return (Fragments)
  1702.     end
  1703.  
  1704.     local function getbiggestaxis(vector)
  1705.         local biggest = 0
  1706.         if(vector.X>biggest)then
  1707.             biggest = vector.X
  1708.         end
  1709.         if(vector.Y>biggest)then
  1710.             biggest = vector.Y
  1711.         end
  1712.         if(vector.Z>biggest)then
  1713.             biggest = vector.Z
  1714.         end
  1715.         return biggest
  1716.     end
  1717.  
  1718.     local function shatterify(b)
  1719.         if(b:IsA("BasePart"))then
  1720.             pcall(function()
  1721.                 if(b.Transparency >= 1)then
  1722.                     pcall(game.Destroy,b)
  1723.                     return
  1724.                 end
  1725.                 b.Anchored = true
  1726.                 local fragments = Fragment(b, -1)
  1727.                 pcall(game.Destroy,b)
  1728.                 for i,v in next, fragments do
  1729.                     pcall(function()
  1730.                         task.spawn(function()
  1731.                             v.Anchored = true
  1732.                             v.Parent = sc.EffectModel
  1733.                             v.Material = Enum.Material.Glass
  1734.                             local biggest = 1+(getbiggestaxis(v.Size)/2)
  1735.                             local pos = v.Position + (Vector3.new(math.random(-3,3),math.random(2,5),math.random(-3,3))*Vector3.new(biggest,biggest,biggest))
  1736.                             local mag = (v.Position - pos).Magnitude
  1737.                             self:ClientTween(v,TweenInfo.new((mag/2)/biggest, Enum.EasingStyle.Back),{
  1738.                                 Position = pos,
  1739.                                 Size = v.Size/3,
  1740.                                 Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  1741.                             })
  1742.                             task.wait((mag/2)/biggest)
  1743.                             if(v and v:IsDescendantOf(game))then
  1744.                                 local fragments2 = Fragment(v, 0)
  1745.                                 if(v and v:IsDescendantOf(game))then
  1746.                                     pcall(game.Destroy,v)
  1747.                                     for i,a in next, fragments2 do
  1748.                                         task.spawn(function()
  1749.                                             a.Anchored = true
  1750.                                             a.Parent = sc.EffectModel
  1751.                                             a.Material = Enum.Material.Glass
  1752.                                             self:SoundEffect(a,7140152893,1,math.random(70,120)/100,true)
  1753.                                             biggest = 1+(getbiggestaxis(a.Size)/2)
  1754.                                             local pos = a.Position + (Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))*Vector3.new(biggest,biggest,biggest))
  1755.                                             local mag = (a.Position - pos).Magnitude
  1756.                                             self:ClientTween(a,TweenInfo.new(mag/biggest),{
  1757.                                                 Position = pos,
  1758.                                                 Size = Vector3.new(),
  1759.                                                 Transparency = 1,
  1760.                                                 Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  1761.                                             })
  1762.                                             task.wait((mag)/biggest)
  1763.                                             pcall(game.Destroy,a)
  1764.                                         end)
  1765.                                     end
  1766.                                 end
  1767.                             else
  1768.                                 pcall(game.Destroy,v)
  1769.                             end
  1770.                         end)
  1771.                     end)
  1772.                 end
  1773.                 pcall(game.Destroy,b)
  1774.             end)
  1775.         end
  1776.     end
  1777.     if(p:IsA("Model") or p:IsA("Folder") or p:IsA("WorldModel"))then
  1778.         self:SoundEffect(p:FindFirstChildWhichIsA("Part",true),9125402735,10,math.random(70,120)/100,true)
  1779.         self:CleanObject(p,{})
  1780.         for i,b in next, p:GetDescendants() do
  1781.             if(b:IsA("BasePart"))then
  1782.                 coroutine.wrap(shatterify)(b)
  1783.             end
  1784.         end
  1785.         pcall(game.Destroy,p)
  1786.     elseif(p:IsA("BasePart"))then
  1787.         self:SoundEffect(p,9125402735,10,math.random(70,120)/100,true)
  1788.         self:CleanObject(p,{})
  1789.         coroutine.wrap(shatterify)(p)
  1790.         for i,v in next, p:GetDescendants() do
  1791.             if(v:IsA("BasePart"))then
  1792.                 coroutine.wrap(shatterify)(v)
  1793.             end
  1794.         end
  1795.         pcall(game.Destroy,p)
  1796.     end
  1797. end
  1798.  
  1799. function sc:Raycast(Start,End,Distance,Ignore)
  1800.     local Hit,Pos,Mag,Table = nil,nil,0,{}
  1801.     local B,V = workspace:FindPartOnRayWithIgnoreList(Ray.new(Start,((CFrame.new(Start,End).lookVector).unit) * Distance),(Ignore or {}))
  1802.     if B ~= nil then
  1803.         local BO = (Start - V).Magnitude
  1804.         table.insert(Table, {Hit = B, Pos = V, Mag = BO})
  1805.     end
  1806.     for i,g in next, self.WorldModels do
  1807.         local N,M = g:FindPartOnRayWithIgnoreList(Ray.new(Start,((CFrame.new(Start,End).lookVector).unit) * Distance),(Ignore or {}))
  1808.         if N ~= nil then
  1809.             local BO = (Start - M).Magnitude
  1810.             table.insert(Table, {Hit = N, Pos = M, Mag = BO})
  1811.         end
  1812.     end
  1813.     for i,g in next, Table do
  1814.         if i == 1 then
  1815.             Mag = Table[i].Mag
  1816.         end
  1817.         if Table[i].Mag <= Mag then
  1818.             Mag = Table[i].Mag
  1819.             Hit = Table[i].Hit
  1820.             Pos = Table[i].Pos
  1821.         end
  1822.     end
  1823.     return Hit,Pos
  1824. end
  1825.  
  1826. function sc:ClientRaycast(Start,End,Distance,Ignore)
  1827.     local success, hit, pos = pcall(function()
  1828.         return self.RemoteFunction:InvokeClient(self:GetCurrentPlayer(), "Raycast", {
  1829.             Start,
  1830.             End,
  1831.             Distance,
  1832.             Ignore,
  1833.             self.WorldModels
  1834.         })
  1835.     end)
  1836.     if(success)then
  1837.         return hit, pos
  1838.     else
  1839.         return nil, Vector3.new()
  1840.     end
  1841. end
  1842.  
  1843. function sc:ClientTween(Object,Info,Goal)
  1844.     game:GetService("TweenService"):Create(Object,Info,Goal):Play()
  1845. end
  1846.  
  1847. function sc:part(cf,size,trans,mat,col,tweentime,tween)
  1848.     local p = Instance.new('Part')
  1849.     p.Anchored = true
  1850.     p.CanCollide = false
  1851.     p.Parent = self.EffectModel
  1852.     p.CFrame = cf
  1853.     p.Transparency = trans
  1854.     p.Material = mat
  1855.     p.Color = col
  1856.     p.Size = size
  1857.     p.CanQuery = false
  1858.     p.CanTouch = false
  1859.     self:ClientTween(p,TweenInfo.new(tweentime),tween)
  1860.     task.delay(tweentime, pcall, game.Destroy, p)
  1861.     return p
  1862. end
  1863.  
  1864. function sc:Wave(cframe,size,trans,col,tweenwait,tween)
  1865.     local Wavee = script.Stuff.Wave:Clone()
  1866.     Wavee.Parent = self.EffectModel
  1867.     Wavee.CFrame = cframe
  1868.     Wavee.Size = size
  1869.     Wavee.Transparency = trans
  1870.     Wavee.Color = col
  1871.     self:ClientTween(Wavee,TweenInfo.new(tweenwait),tween)
  1872.     task.delay(tweenwait, pcall, game.Destroy, Wavee)
  1873. end
  1874.  
  1875. function sc:RandomString(length)
  1876.     local a = ""
  1877.     for i = 1, length do
  1878.         a ..= string.char(math.random(1,120))
  1879.     end
  1880.     return a
  1881. end
  1882.  
  1883.  
  1884. local chatfuncSymbols = {
  1885.     "/",
  1886.     "|",
  1887.     "(",
  1888.     "!",
  1889.     "@",
  1890.     "#",
  1891.     "$",
  1892.     "%",
  1893.     "^",
  1894.     "&",
  1895.     "*",
  1896.     "(",
  1897.     ")",
  1898.     "<",
  1899.     ">",
  1900.     "?",
  1901.     [[\]],
  1902.     "-",
  1903.     "+",
  1904.     "~",
  1905.     "`",
  1906.     ".",
  1907.     "[",
  1908.     "]",
  1909.     "="
  1910. }
  1911.  
  1912. local chatfuncs = {}
  1913.  
  1914. function sc:chatfunc(msg)
  1915.     task.spawn(function()
  1916.         local amountsofchats = #chatfuncs
  1917.         if amountsofchats >= 5 then
  1918.             chatfuncs[1]:Destroy()
  1919.             table.remove(chatfuncs, 1)
  1920.         end
  1921.         for i, v in next, chatfuncs do
  1922.             v.StudsOffset += Vector3.new(0,1.5,0)
  1923.         end
  1924.         local bil = Instance.new('BillboardGui')
  1925.         bil.Name = "EmperorChatLabelIUFH"..self.Player
  1926.         bil.Parent = workspace
  1927.         pcall(function()
  1928.             bil.Adornee = self.FakeHead.self
  1929.         end)
  1930.         bil.LightInfluence = 0
  1931.         bil.Size = UDim2.new(1000,0,1,0)
  1932.         bil.StudsOffset = Vector3.new(-0.7,2.5,0)
  1933.         table.insert(chatfuncs, bil)
  1934.         local numoftext = 0
  1935.         local letters = #msg:sub(1)
  1936.         local children = 0
  1937.         local texts = {}
  1938.         local textdebris = {}
  1939.         task.spawn(function()
  1940.             for i = 1,string.len(msg) do
  1941.                 children += .05
  1942.                 local txt = Instance.new("TextLabel")
  1943.                 txt.Size=UDim2.new(0.001,0,1,0)
  1944.                 txt.TextScaled=true
  1945.                 txt.TextWrapped=true
  1946.                 txt.Font=Enum.Font.GrenzeGotisch
  1947.                 txt.BackgroundTransparency=1
  1948.                 txt.TextStrokeTransparency=0
  1949.                 txt.TextColor3 = Color3.new(0,0,1)
  1950.                 txt.TextStrokeColor3 = Color3.new(0,0,0)
  1951.                 txt.Position=UDim2.new(0.5-(-i*(0.001/2)),0,0.5,0)
  1952.                 txt.Text=msg:sub(i,i)
  1953.                 txt.ZIndex = 2
  1954.                 txt.Parent=bil
  1955.                 bil.StudsOffset-=Vector3.new(0.25,0,0)
  1956.                 letters-=1
  1957.                 table.insert(texts, txt)
  1958.                 numoftext+=1
  1959.                 task.delay(5.5+children, function()
  1960.                     local tw = game:GetService('TweenService'):Create(txt,TweenInfo.new(.5),{
  1961.                         TextTransparency = 1,
  1962.                         TextStrokeTransparency = 1
  1963.                     })
  1964.                     tw:Play()
  1965.                     tw.Completed:wait()
  1966.                     txt:Destroy()
  1967.                     bil.StudsOffset-=Vector3.new(0.25,0,0)
  1968.                     game:GetService("TweenService"):Create(bil, TweenInfo.new(.3), {
  1969.                         StudsOffset=bil.StudsOffset-Vector3.new(0.25,0,0)
  1970.                     }):Play()
  1971.                     children -= .1
  1972.                 end)
  1973.                 pcall(function()
  1974.                     local s = Instance.new("Sound", self.FakeHead.self)
  1975.                     s.Volume = 1
  1976.                     s.SoundId = "rbxassetid://"..8549394881
  1977.                     s.Pitch = math.random(80,120)/100
  1978.                     s.PlayOnRemove = true
  1979.                     s:Destroy()
  1980.                 end)
  1981.                 task.wait()
  1982.                 task.wait()
  1983.                 task.wait()
  1984.             end
  1985.         end)
  1986.         game:GetService("Debris"):AddItem(bil, 20)
  1987.         task.spawn(function()
  1988.             repeat
  1989.                 if(not bil)or(not bil:IsDescendantOf(workspace))then
  1990.                     break
  1991.                 end
  1992.                 pcall(function()
  1993.                     task.wait()
  1994.                     for i,v in next, texts do
  1995.                         if(math.random(1,1000) == 1)and(string.sub(msg, i, i) ~= " ")and v:IsDescendantOf(bil)then
  1996.                             local origtx = string.sub(msg, i, i)
  1997.                             v.Text = chatfuncSymbols[math.random(1,#chatfuncSymbols)]
  1998.                             pcall(function()
  1999.                                 local s = Instance.new("Sound", self.FakeHead.self)
  2000.                                 s.Volume = .5
  2001.                                 s.SoundId = "rbxassetid://"..8622488090
  2002.                                 s.Pitch = math.random(120,150)/100
  2003.                                 s.PlayOnRemove = true
  2004.                                 s:Destroy()
  2005.                             end)
  2006.                             task.spawn(function()
  2007.                                 for i = 1, 10 do
  2008.                                     v.Text = chatfuncSymbols[math.random(1,#chatfuncSymbols)]
  2009.                                     task.wait()
  2010.                                     task.wait()
  2011.                                 end
  2012.                                 v.Text = origtx
  2013.                             end)
  2014.                         end
  2015.                     end
  2016.                 end)
  2017.             until not bil:IsDescendantOf(workspace)
  2018.         end)
  2019.         task.spawn(function()
  2020.             repeat
  2021.                 if(not bil)or(not bil:IsDescendantOf(workspace))then
  2022.                     break
  2023.                 end
  2024.                 pcall(function()
  2025.                     task.wait()
  2026.                     if #bil:GetChildren() <= 0 then
  2027.                         bil:Destroy()
  2028.                         return
  2029.                     end
  2030.                     bil.Adornee = self.FakeHead.self
  2031.                     bil.Parent = workspace
  2032.                 end)
  2033.             until not bil:IsDescendantOf(workspace)
  2034.         end)
  2035.         task.spawn(function()
  2036.             repeat
  2037.                 if(not bil)or(not bil:IsDescendantOf(workspace))then
  2038.                     break
  2039.                 end
  2040.                 pcall(function()
  2041.                     task.wait()
  2042.                     for i,v in next, texts do
  2043.                         if(v:IsDescendantOf(bil))then
  2044.                             if(i ~= #texts)then
  2045.                                 game:GetService('TweenService'):Create(v,TweenInfo.new(.1),{
  2046.                                     Position = UDim2.new(0.5-(-i*(0.001/2)), 0+math.random(-2,2), 0.5, 0+math.random(-2,2)),
  2047.                                     Rotation = math.random(-10,10)
  2048.                                 }):Play()
  2049.                             else
  2050.                                 local tw = game:GetService('TweenService'):Create(v,TweenInfo.new(.1),{
  2051.                                     Position = UDim2.new(0.5-(-i*(0.001/2)), 0+math.random(-2,2), 0.5, 0+math.random(-2,2)),
  2052.                                     Rotation = math.random(-10,10)
  2053.                                 })
  2054.                                 tw:Play()
  2055.                                 tw.Completed:Wait()
  2056.                             end
  2057.                         end
  2058.                     end
  2059.                 end)
  2060.             until not bil:IsDescendantOf(workspace)
  2061.         end)
  2062.         task.spawn(function()
  2063.             repeat
  2064.                 if(not bil)or(not bil:IsDescendantOf(workspace))then
  2065.                     break
  2066.                 end
  2067.                 pcall(function()
  2068.                     task.wait()
  2069.                     for i,v in next, texts do
  2070.                         if math.random(1,10) == 1 and v:IsDescendantOf(bil) then
  2071.                             local tx = v:Clone()
  2072.                             tx.Parent = bil
  2073.                             tx.ZIndex = 1
  2074.                             table.insert(textdebris,tx)
  2075.                             game:GetService('TweenService'):Create(tx,TweenInfo.new(1),{
  2076.                                 Position = UDim2.new(0.5-(-i*(0.001/2)), 0+math.random(-30,30), 0.5, 0+math.random(-30,30)),
  2077.                                 TextTransparency = 1,
  2078.                                 TextStrokeTransparency = 1,
  2079.                                 Size = UDim2.new(0,0,0),
  2080.                                 TextColor3 = Color3.new(0,0,0)
  2081.                             }):Play()
  2082.                             task.delay(1, pcall, game.Destroy, tx)
  2083.                         end
  2084.                     end
  2085.                     task.wait(math.random())
  2086.                 end)
  2087.             until not bil:IsDescendantOf(workspace)
  2088.         end)
  2089.     end)
  2090. end
  2091.  
  2092. function sc:Init()
  2093.     local self = self
  2094.     self.Player = owner.Name
  2095.     if(self.Player == "")then
  2096.         self.Player = nil
  2097.         return
  2098.     end
  2099.     task.wait()
  2100.  
  2101.     if(game:GetService("ReplicatedStorage"):FindFirstChild("__FakeChar"..self:GetCurrentPlayer().UserId))then
  2102.         game:GetService("ReplicatedStorage"):FindFirstChild("__FakeChar"..self:GetCurrentPlayer().UserId):Destroy()
  2103.     end
  2104.    
  2105.     if(game:GetService("ReplicatedStorage"):FindFirstChild("__FakeCharRemoteFunction"..self:GetCurrentPlayer().UserId))then
  2106.         game:GetService("ReplicatedStorage"):FindFirstChild("__FakeCharRemoteFunction"..self:GetCurrentPlayer().UserId):Destroy()
  2107.     end
  2108.  
  2109.     game:GetService("JointsService"):ClearAllChildren()
  2110.    
  2111.     for i, v in next, game:GetService("Players"):GetPlayers() do
  2112.         if(v:FindFirstChildOfClass("PlayerGui") and v:FindFirstChildOfClass("PlayerGui"):FindFirstChild("__Client"))then
  2113.             v:FindFirstChildOfClass("PlayerGui"):FindFirstChild("__Client"):Destroy()
  2114.         end
  2115.     end
  2116.  
  2117.  
  2118.     self.FpsValue = self:GetFpsVal()
  2119.  
  2120.     for i,v in next, workspace:GetDescendants() do
  2121.         if(v:IsA("WorldModel"))then
  2122.             table.insert(self.WorldModels, v)
  2123.         end
  2124.     end
  2125.  
  2126.     table.insert(self.Connections, workspace.DescendantAdded:Connect(function(obj)
  2127.         if(obj:IsA("WorldModel"))then
  2128.             table.insert(self.WorldModels, obj)
  2129.         end
  2130.     end))
  2131.  
  2132.     table.insert(self.Connections, workspace.DescendantRemoving:Connect(function(obj)
  2133.         if(obj:IsA("WorldModel") and table.find(self.WorldModels,obj))then
  2134.             table.remove(self.WorldModels, table.find(self.WorldModels,obj))
  2135.         end
  2136.     end))
  2137.  
  2138.     table.insert(sc.Connections, game.DescendantAdded:Connect(function(obj)
  2139.         if(not self.isDescendantOfIgnores(obj))then
  2140.             self.DecimateCheck(obj)
  2141.         end
  2142.     end))
  2143.     -- -- -- -- -- -- Setup -- -- -- -- -- --
  2144.  
  2145.     local sin = 0
  2146.  
  2147.     head = nil
  2148.     self:AddRefit(getfenv(), "head", script.Character.Head, {
  2149.         DestroyAfterSeconds = .5,
  2150.         Properties = {
  2151.             Parent = workspace,
  2152.             Anchored = true,
  2153.             CanTouch = false,
  2154.             CanQuery = false,
  2155.             CFrame = CFrame.new()
  2156.         },
  2157.         OnDestroy = function()
  2158.             self.UpdateIgnore()
  2159.         end
  2160.     })
  2161.     self.Head = CFrame.new()
  2162.  
  2163.     leftarm = nil
  2164.     self:AddRefit(getfenv(), "leftarm", script.Character["Left Arm"], {
  2165.         DestroyAfterSeconds = .5,
  2166.         Properties = {
  2167.             Parent = workspace,
  2168.             Anchored = true,
  2169.             CanTouch = false,
  2170.             CanQuery = false,
  2171.             CFrame = CFrame.new()
  2172.         },
  2173.         OnDestroy = function()
  2174.             self.UpdateIgnore()
  2175.         end
  2176.     })
  2177.     self.LeftArm = CFrame.new()
  2178.  
  2179.     leftleg = nil
  2180.     self:AddRefit(getfenv(), "leftleg", script.Character["Left Leg"], {
  2181.         DestroyAfterSeconds = .5,
  2182.         Properties = {
  2183.             Parent = workspace,
  2184.             Anchored = true,
  2185.             CanTouch = false,
  2186.             CanQuery = false,
  2187.             CFrame = CFrame.new()
  2188.         },
  2189.         OnDestroy = function()
  2190.             self.UpdateIgnore()
  2191.         end
  2192.     })
  2193.     self.LeftLeg = CFrame.new()
  2194.  
  2195.     rightarm = nil
  2196.     self:AddRefit(getfenv(), "rightarm", script.Character["Right Arm"], {
  2197.         DestroyAfterSeconds = .5,
  2198.         Properties = {
  2199.             Parent = workspace,
  2200.             Anchored = true,
  2201.             CanTouch = false,
  2202.             CanQuery = false,
  2203.             CFrame = CFrame.new()
  2204.         },
  2205.         OnDestroy = function()
  2206.             rightarm.self.Attachment.CFrame = CFrame.Angles(0,math.rad((sin)/self.FpsValue),0)*CFrame.new(0,-0.4, -0.7)
  2207.             rightarm.self.Attachment2.CFrame = CFrame.Angles(0,math.rad((sin)/self.FpsValue),0)*CFrame.new(0,-0.4, 0.7)
  2208.             self.UpdateIgnore()
  2209.             self.WeaponCheck()
  2210.         end,
  2211.     })
  2212.     self.RightArm = CFrame.new()
  2213.  
  2214.     rightleg = nil
  2215.     self:AddRefit(getfenv(), "rightleg", script.Character["Right Leg"], {
  2216.         DestroyAfterSeconds = .5,
  2217.         Properties = {
  2218.             Parent = workspace,
  2219.             Anchored = true,
  2220.             CanTouch = false,
  2221.             CanQuery = false,
  2222.             CFrame = CFrame.new()
  2223.         },
  2224.         OnDestroy = function()
  2225.             self.UpdateIgnore()
  2226.         end,
  2227.     })
  2228.     self.RightLeg = CFrame.new()
  2229.  
  2230.     torso = nil
  2231.     self:AddRefit(getfenv(), "torso", script.Character.Torso, {
  2232.         DestroyAfterSeconds = .5,
  2233.         Properties = {
  2234.             Parent = workspace,
  2235.             Anchored = true,
  2236.             CanTouch = false,
  2237.             CanQuery = false,
  2238.             CFrame = CFrame.new()
  2239.         },
  2240.         OnDestroy = function()
  2241.             torso.self.Chain.CurveSize1 = math.cos(sin/20)
  2242.             torso.self.Attachment2.CFrame = CFrame.new(1*math.sin(sin/20), .2*math.cos(sin/30), 4+.2*math.cos(sin/40))
  2243.             self.UpdateIgnore()
  2244.         end
  2245.     })
  2246.  
  2247.     axe = nil
  2248.     self:AddRefit(getfenv(), "axe", script.Character.Axe, {
  2249.         DestroyAfterSeconds = 5,
  2250.         Properties = {
  2251.             Parent = workspace,
  2252.             Anchored = true,
  2253.             CanTouch = false,
  2254.             CanQuery = false,
  2255.             CFrame = CFrame.new()
  2256.         },
  2257.         OnDestroy = function()
  2258.             self.UpdateIgnore()
  2259.             self.WeaponCheck()
  2260.         end,
  2261.     })
  2262.     self.Axe = CFrame.new()
  2263.  
  2264.     local mus = nil
  2265.     campart = nil
  2266.     self:AddRefit(getfenv(), "campart", Instance.new("Part"), {
  2267.         DestroyAfterSeconds = 5,
  2268.         OnDestroy = function()
  2269.             self:FixCam(campart.self)
  2270.             if(not mus or not mus:IsDescendantOf(campart.self))then
  2271.                 pcall(game.Destroy,mus)
  2272.                 mus = Instance.new("Sound", campart.self)
  2273.                 mus.SoundId = "rbxassetid://"..self.Ids[self.SoundIdNum]
  2274.                 if(not self.Muted)then
  2275.                     mus.Volume = self.Volume
  2276.                 else
  2277.                     mus.Volume = 0
  2278.                 end
  2279.                 mus.Pitch = self.Pitch
  2280.                 mus.TimePosition = self.TimePos
  2281.                 mus.Looped = true
  2282.                 mus:Play()
  2283.             elseif(mus and mus:IsDescendantOf(campart.self))then
  2284.                 self.TimePos = mus.TimePosition
  2285.                 mus.SoundId = "rbxassetid://"..self.Ids[self.SoundIdNum]
  2286.                 if(not self.Muted)then
  2287.                     mus.Volume = self.Volume
  2288.                 else
  2289.                     mus.Volume = 0
  2290.                 end
  2291.                 mus.Pitch = self.Pitch
  2292.                 mus.Looped = true
  2293.                 mus:Resume()
  2294.             end
  2295.             if(musval)then
  2296.                 musval.self.Value = mus
  2297.             end
  2298.             self.UpdateIgnore()
  2299.         end,
  2300.         DisableDescendantChecks = true,
  2301.         Properties = {
  2302.             Parent = game:GetService('JointsService'),
  2303.             Size = Vector3.new(),
  2304.             CFrame = CFrame.new(),
  2305.             Transparency = 1
  2306.         }
  2307.     })
  2308.     task.spawn(function()
  2309.         task.wait(1/30)
  2310.         self:FixCam(campart.self)
  2311.     end)
  2312.  
  2313.     headval = nil
  2314.     self:AddRefit(getfenv(), "headval", Instance.new("ObjectValue"), {
  2315.         DestroyAfterSeconds = .5,
  2316.         OnDestroy = function()
  2317.             headval.self.Value = head.self
  2318.         end,
  2319.         Properties = {
  2320.             Name = "__FakeCharHead"..self:GetCurrentPlayer().UserId,
  2321.             Parent = game:GetService("JointsService")
  2322.         }
  2323.     })
  2324.    
  2325.     self.FakeHead = head
  2326.    
  2327.     musval = nil
  2328.     self:AddRefit(getfenv(), "musval", Instance.new("ObjectValue"), {
  2329.         DestroyAfterSeconds = .5,
  2330.         OnDestroy = function()
  2331.             musval.self.Value = mus
  2332.         end,
  2333.         Properties = {
  2334.             Name = "__FakeCharMusic"..self:GetCurrentPlayer().UserId,
  2335.             Parent = game:GetService("JointsService")
  2336.         }
  2337.     })
  2338.     self.Killaura = false
  2339.  
  2340.     function chatfunc(msg)
  2341.         sc:chatfunc(msg)
  2342.     end
  2343.  
  2344.     self.SmokeTime = 0
  2345.     self.W = false
  2346.     self.A = false
  2347.     self.S = false
  2348.     self.D = false
  2349.     self.CameraCFrame = CFrame.new()
  2350.     self.ShiftLock = false
  2351.     self.MouseHit = CFrame.new()
  2352.  
  2353.     self.RemoteFuncs = function(Player, Type, Data)
  2354.         if(Player ~= self:GetCurrentPlayer())then
  2355.             return
  2356.         end
  2357.         if(Type == "MouseHit")then
  2358.             local hit, pos = self:ClientRaycast(self.CameraCFrame.Position, Data.Value.Position, 9999999999, self.Ignore)
  2359.             if(hit)then
  2360.                 self.MouseHit = CFrame.new(pos.X,pos.Y,pos.Z)
  2361.             else
  2362.                 self.MouseHit = Data.Value
  2363.             end
  2364.         end
  2365.         if(Type == "Mouse")then
  2366.             if Data.Key=="w" then
  2367.                 if Data.Up==false then
  2368.                     self.W=true
  2369.                 elseif Data.Up==true then
  2370.                     self.W=false
  2371.                 end
  2372.             end
  2373.             if Data.Key=="a" then
  2374.                 if Data.Up==false then
  2375.                     self.A=true
  2376.                 elseif Data.Up==true then
  2377.                     self.A=false
  2378.                 end
  2379.             end
  2380.             if Data.Key=="s" then
  2381.                 if Data.Up==false then
  2382.                     self.S=true
  2383.                 elseif Data.Up==true then
  2384.                     self.S=false
  2385.                 end
  2386.             end
  2387.             if Data.Key=="d" then
  2388.                 if Data.Up==false then
  2389.                     self.D=true
  2390.                 elseif Data.Up==true then
  2391.                     self.D=false
  2392.                 end
  2393.             end
  2394.             if(Data.Key == "space")and(not Data.Up)then
  2395.                 if(not self.Falling and not self.Jumping and not self.Flying)then
  2396.                     self.Velocity = Vector3.new(self.Velocity.X,1,self.Velocity.Z)
  2397.                     self.Jumping = true
  2398.                 end
  2399.             end
  2400.             if(Data.Key == "f")and(not Data.Up)then
  2401.                 self.Velocity = Vector3.new()
  2402.                 self.Falling = false
  2403.                 self.Jumping = false
  2404.                 self.Flying = not self.Flying
  2405.             end
  2406.             if(Data.Key == "p")and(not Data.Up)then
  2407.                 self.RefitCore.Remove()
  2408.             end
  2409.             if(Data.Key == "z")and(not Data.Up)and(not self.AxeEnabled)then
  2410.                 self.Attack = true
  2411.                 for i = 1, self:GetFramesToSecond(.3) do
  2412.                     self.Animate({
  2413.                         CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(50),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2414.                         CFrame.new(-1.5,0+.1*math.cos(sin/36),0)*CFrame.Angles(math.rad(0+5*math.cos(sin/32)),math.rad(30+5*math.cos(sin/35)),math.rad(-5+5*math.cos(sin/34))),
  2415.                         CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10),math.rad(0)),
  2416.                         CFrame.new(1.5+.5,0+.3-.1*math.cos(sin/35),-0.3)*CFrame.Angles(math.rad(90+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/30)),math.rad(50-5*math.cos(sin/32))),
  2417.                         CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-30),math.rad(0)),
  2418.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-50+1*math.cos(sin/35)),math.rad(0-1*math.cos(sin/33))),
  2419.                     },.3 / self.FpsValue)
  2420.                     game:GetService("RunService").PostSimulation:Wait()
  2421.                 end
  2422.                 for i = 1,math.random(1,20) do
  2423.                     self:Effect(rightarm.self.HandCannon.Hole.Position, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), .5, {
  2424.                         Transparency = 1,
  2425.                         Color = Color3.new(),
  2426.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2427.                         Position = rightarm.self.HandCannon.Hole.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  2428.                     },{
  2429.                         Scale = Vector3.new()
  2430.                     })
  2431.                     self:Effect(self.MouseHit.Position, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), .5, {
  2432.                         Transparency = 1,
  2433.                         Color = Color3.new(),
  2434.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2435.                         Position = self.MouseHit.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  2436.                     },{
  2437.                         Scale = Vector3.new()
  2438.                     })
  2439.                 end
  2440.                 self:SpawnTrail(rightarm.self.HandCannon.Hole.Position, self.MouseHit.Position, Color3.new(0,0,1), .5)
  2441.                 self:SoundEffect(rightarm.self.HandCannon.Hole, 9058737882, 2, math.random(90,110)/100, true)
  2442.                 self:SoundEffect(rightarm.self.HandCannon.Hole, 9060276709, 1, math.random(90,110)/100, true)
  2443.                 self.SmokeTime += self:GetFramesToSecond(3)
  2444.                 self:Aoe(self.MouseHit.Position, 3)
  2445.                 for i = 1, self:GetFramesToSecond(.3) do
  2446.                     self.Animate({
  2447.                         CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(50),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2448.                         CFrame.new(-1.5,0+.1*math.cos(sin/36),0)*CFrame.Angles(math.rad(0+5*math.cos(sin/32)),math.rad(30+5*math.cos(sin/35)),math.rad(-5+5*math.cos(sin/34))),
  2449.                         CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10),math.rad(0)),
  2450.                         CFrame.new(1.5+.5,0+.3-.1*math.cos(sin/35),-0.3)*CFrame.Angles(math.rad(120+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/30)),math.rad(50-5*math.cos(sin/32))),
  2451.                         CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-30),math.rad(0)),
  2452.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-50+1*math.cos(sin/35)),math.rad(0-1*math.cos(sin/33))),
  2453.                     },.3 / self.FpsValue)
  2454.                     game:GetService("RunService").PostSimulation:Wait()
  2455.                 end
  2456.                 self.Attack = false
  2457.             end
  2458.             if(Data.Key == "c")and(not Data.Up)and(not self.AxeEnabled)then
  2459.                 self.Attack = true
  2460.                 local sparking = true
  2461.                 local lastlightning = tick()
  2462.                 local part = Instance.new("Part", self.EffectModel)
  2463.                 part.Anchored = true
  2464.                 part.CanCollide = false
  2465.                 part.CanQuery = false
  2466.                 part.Color = Color3.new(0,0,.7)
  2467.                 part.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2468.                 part.Position = (leftarm.self.CFrame*CFrame.new(0,-1,0)).Position
  2469.                 part.Size = Vector3.new(.3,.3,.3)
  2470.                 part.Material = Enum.Material.Glass
  2471.                 local cursor = script.Stuff.CursorHit:Clone()
  2472.                 cursor.Parent = self.EffectModel
  2473.                 local param = RaycastParams.new()
  2474.                 param.FilterDescendantsInstances = self.Ignore
  2475.                 local size = 0
  2476.                 task.spawn(function()
  2477.                     while sparking do
  2478.                         self.Animate({
  2479.                             CFrame.new(-0.0165080037, 0, -0.002173702, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.Angles(0,math.rad(-180),0),
  2480.                             CFrame.new(-1.68117309, 0.600000203, -0.676147878, 0.965925813, 0.224143684, -0.129409224, 1.80666973e-07, -0.50000006, -0.866025388, -0.258818716, 0.836516321, -0.482963055)*CFrame.Angles(math.rad(0+5*math.cos(sin/32)),math.rad(0+5*math.cos(sin/35)),math.rad(0+5*math.cos(sin/34))),
  2481.                             CFrame.new(-0.500000656, -2, 4.32133675e-07, 0.965925813, 0, 0.258819044, 0, 1, 0, -0.258819044, 0, 0.965925813),
  2482.                             CFrame.new(1.59836626, -0.0565129519, -0.238548517, 0.87782234, -0.429628849, -0.211770743, 0.159562185, 0.679161251, -0.716435492, 0.451627851, 0.595112503, 0.664735436)*CFrame.Angles(math.rad(0+5*math.cos(sin/35)),math.rad(0+5*math.cos(sin/33)),math.rad(0+5*math.cos(sin/38))),
  2483.                             CFrame.new(0.499998301, -2, 1.02818012e-06, 0.866025329, 0, -0.500000179, 0, 1, 0, 0.500000179, 0, 0.866025329),
  2484.                             CFrame.new(0.0165081024, 1.5, -0.00217294693, 0.866025448, 0, 0.499999791, 0, 1, 0, -0.499999791, 0, 0.866025448)
  2485.                         }, .1 / self.FpsValue)
  2486.                         size += .005
  2487.                         if(tick() - lastlightning)>=.3 then
  2488.                             local dist = 1+size
  2489.                             self:Lightning((leftarm.self.CFrame*CFrame.new(0,-1+(-.3-size),0)).Position+Vector3.new(math.random(-dist,dist),math.random(-dist,dist),math.random(-dist,dist)), (leftarm.self.CFrame*CFrame.new(0,-1+(-.3-size),0)).Position+Vector3.new(math.random(-dist,dist),math.random(-dist,dist),math.random(-dist,dist)), 3*dist, 3, Color3.new(0,0,1), .3)
  2490.                             lastlightning = tick()
  2491.                         end
  2492.                         local p = Instance.new("Part", self.EffectModel)
  2493.                         p.Anchored = true
  2494.                         p.CanCollide = false
  2495.                         p.CanQuery = false
  2496.                         p.Color = Color3.new(0,0,.7)
  2497.                         p.Material = Enum.Material.Glass
  2498.                         p.Size = Vector3.new(.3+size,.3+size,.3+size)
  2499.                         p.Position = (leftarm.self.CFrame*CFrame.new(0,-1+(-.3-size),0)).Position
  2500.                         p.Orientation = Vector3.new(sin/3,sin/2,sin)
  2501.                         self:ClientTween(p, TweenInfo.new(.5), {
  2502.                             Size = Vector3.new(.3+size+.2,.3+size+.2,.3+size+.2),
  2503.                             Transparency = 1,
  2504.                             Color = Color3.new(0,0,1)
  2505.                         })
  2506.                         task.delay(.5, pcall, game.Destroy, p)
  2507.                         part.Size = Vector3.new(.3+size,.3+size,.3+size)
  2508.                         part.Position = (leftarm.self.CFrame*CFrame.new(0,-1+(-.3-size),0)).Position
  2509.                         part.Orientation = Vector3.new(sin/3,sin/2,sin)
  2510.                         param.FilterDescendantsInstances = self.Ignore
  2511.                         local ray = workspace:Raycast(self.CameraCFrame.Position, (self.MouseHit.Position - self.CameraCFrame.Position)*2, param)
  2512.                         if(ray)then
  2513.                             cursor.CFrame = cursor.CFrame:Lerp(CFrame.new(ray.Position, ray.Position + ray.Normal) * CFrame.Angles(math.rad(-90), math.rad(sin%360), 0), .3)
  2514.                         end
  2515.                         game:GetService("RunService").PostSimulation:Wait()
  2516.                     end
  2517.                 end)
  2518.                 task.wait(5)
  2519.                 sparking = false
  2520.                 local hit = self.MouseHit
  2521.                 local ray = workspace:Raycast(self.CameraCFrame.Position, (self.MouseHit.Position - self.CameraCFrame.Position)*2, param)
  2522.                 if(not ray)then
  2523.                     self.Attack = false
  2524.                     return
  2525.                 end
  2526.                 self:ClientTween(cursor, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
  2527.                     Size = Vector3.new(10,0.1,10),
  2528.                     CFrame = CFrame.new(ray.Position, ray.Position + ray.Normal) * CFrame.Angles(math.rad(-90), math.rad(cursor.Orientation.Z+360), 0)
  2529.                 })
  2530.                 self:ClientTween(cursor.Decal, TweenInfo.new(1, Enum.EasingStyle.Exponential),{
  2531.                     Transparency = 1
  2532.                 })
  2533.                 task.delay(1, pcall, game.Destroy, cursor)
  2534.                 for i = 1, self:GetFramesToSecond(.1) do
  2535.                     self.Animate({
  2536.                         CFrame.new(-0.0165080037, 0, -0.002173702, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.Angles(0,math.rad(-180),0),
  2537.                         CFrame.new(-1.55176365, 1.1000005, -0.193184972, 0.965925872, 0.129409432, -0.224143475, 1.0430815e-07, -0.866025388, -0.50000006, -0.258818626, 0.482962996, -0.83651638),
  2538.                         CFrame.new(-0.500000656, -2, 4.32133675e-07, 0.965925813, 0, 0.258819044, 0, 1, 0, -0.258819044, 0, 0.965925813),
  2539.                         CFrame.new(1.59836626, -0.0565129519, -0.238548517, 0.87782234, -0.429628849, -0.211770743, 0.159562185, 0.679161251, -0.716435492, 0.451627851, 0.595112503, 0.664735436),
  2540.                         CFrame.new(0.499998301, -2, 1.02818012e-06, 0.866025329, 0, -0.500000179, 0, 1, 0, 0.500000179, 0, 0.866025329),
  2541.                         CFrame.new(0.0682707876, 1.49999988, 0.191012651, 0.87500006, 0.129409418, 0.466506183, 0.129409522, 0.866025388, -0.482962906, -0.466506153, 0.482962936, 0.741025448)
  2542.                     }, .3 / self.FpsValue)
  2543.                     game:GetService("RunService").PostSimulation:Wait()
  2544.                 end
  2545.                 for i = 1,math.random(1,5) do
  2546.                     self:Lightning(part.Position, part.Position + Vector3.new(0,80,0), 1, 15, Color3.new(0,0,1), .5+size/2)
  2547.                 end
  2548.                 pcall(game.Destroy, part)
  2549.                 for i = 1, self:GetFramesToSecond(.5) do
  2550.                     self.Animate({
  2551.                         CFrame.new(-0.0165080037, 0, -0.002173702, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.Angles(0,math.rad(-180),0),
  2552.                         CFrame.new(-1.55176365, 1.1000005, -0.193184972, 0.965925872, 0.129409432, -0.224143475, 1.0430815e-07, -0.866025388, -0.50000006, -0.258818626, 0.482962996, -0.83651638),
  2553.                         CFrame.new(-0.500000656, -2, 4.32133675e-07, 0.965925813, 0, 0.258819044, 0, 1, 0, -0.258819044, 0, 0.965925813),
  2554.                         CFrame.new(1.59836626, -0.0565129519, -0.238548517, 0.87782234, -0.429628849, -0.211770743, 0.159562185, 0.679161251, -0.716435492, 0.451627851, 0.595112503, 0.664735436),
  2555.                         CFrame.new(0.499998301, -2, 1.02818012e-06, 0.866025329, 0, -0.500000179, 0, 1, 0, 0.500000179, 0, 0.866025329),
  2556.                         CFrame.new(0.0682707876, 1.49999988, 0.191012651, 0.87500006, 0.129409418, 0.466506183, 0.129409522, 0.866025388, -0.482962906, -0.466506153, 0.482962936, 0.741025448)
  2557.                     }, .1 / self.FpsValue)
  2558.                     game:GetService("RunService").PostSimulation:Wait()
  2559.                 end
  2560.                 task.delay(3, function()
  2561.                     for i = 1, math.random(1,5) do
  2562.                         self:Lightning(hit.Position + Vector3.new(0,80,0), hit.Position, 1, 15, Color3.new(0,0,1), .5+size/2)
  2563.                     end
  2564.                     task.wait(.5)
  2565.                     local sparking = true
  2566.                     local lastspark = tick()
  2567.                     local p = Instance.new("Part", self.EffectModel)
  2568.                     p.Anchored = true
  2569.                     p.CanCollide = false
  2570.                     p.CanQuery = false
  2571.                     p.Transparency = 1
  2572.                     p.CFrame = hit
  2573.                     self:SoundEffect(p, 165796875, 10, 1, false)
  2574.                     task.spawn(function()
  2575.                         while sparking do
  2576.                             if(tick() - lastspark)>=.2 then
  2577.                                 self:Lightning(hit.Position + Vector3.new(math.random(-7, 7),math.random(-7, 7),math.random(-7, 7)), hit.Position + Vector3.new(math.random(-7, 7),math.random(-7, 7),math.random(-7, 7)), 10, 15, Color3.new(0,0,1), .5)
  2578.                                 lastspark = tick()
  2579.                             end
  2580.                             game:GetService("RunService").PostSimulation:Wait()
  2581.                         end
  2582.                     end)
  2583.                     task.wait(2)
  2584.                     sparking = false
  2585.                     self:SoundEffect(p, 4988868452, 10, 1, true)
  2586.                     task.delay(0, pcall, game.Destroy, p)
  2587.                     local done = false
  2588.                     local p2 = self:part(CFrame.new(hit.Position),Vector3.new(30,30,30),0,Enum.Material.Neon,Color3.new(0,0,1),10,{
  2589.                         Transparency = 1,
  2590.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2591.                     })
  2592.                     p = self:part(CFrame.new(hit.Position)*CFrame.new(0,2048/2,0),Vector3.new(15,2048,15),0,Enum.Material.Neon,Color3.new(0,0,1),10,{
  2593.                         Transparency = 1,
  2594.                         Orientation = Vector3.new(0,math.random(-360,360),0)
  2595.                     })
  2596.                     local start = tick()
  2597.                     task.spawn(function()
  2598.                         pcall(function()
  2599.                             local a = 0
  2600.                             local b = false
  2601.                             repeat
  2602.                                 game:GetService("RunService").PostSimulation:Wait()
  2603.                                 a += 1
  2604.                                 if a >= 10 then
  2605.                                     a = 0
  2606.                                     b = not b
  2607.                                     if b == true then
  2608.                                         self:ClientTween(p,TweenInfo.new(.5),{
  2609.                                             Size = Vector3.new(15/2,2048,15/2)
  2610.                                         })
  2611.                                     elseif b == false then
  2612.                                         self:ClientTween(p,TweenInfo.new(.5),{
  2613.                                             Size = Vector3.new(15,2048,15)
  2614.                                         })
  2615.                                     end
  2616.                                 end
  2617.                             until done == true
  2618.                         end)
  2619.                     end)
  2620.                     task.spawn(function()
  2621.                         pcall(function()
  2622.                             repeat
  2623.                                 game:GetService("RunService").PostSimulation:Wait()
  2624.                                 self:Wave(CFrame.new(hit.Position),Vector3.new(0,0,0),(tick() - start)/10,Color3.new(0,0,1),.5,{
  2625.                                     Size = Vector3.new(70,5,70),
  2626.                                     Transparency = 1,
  2627.                                     Orientation = Vector3.new(0,math.random(-360,360),0)
  2628.                                 })
  2629.                                 if(tick() - start)<=7 then
  2630.                                     if(math.random(1,8)) == 1 then
  2631.                                         self:Lightning(hit.Position + Vector3.new(math.random(-40, 40),math.random(-5, 40),math.random(-40, 40)), hit.Position + Vector3.new(math.random(-40, 40),math.random(-5, 40),math.random(-40, 40)), 10, 15, Color3.new(0,0,1), math.random(80,300)/100)
  2632.                                         lastspark = tick()
  2633.                                     end
  2634.                                 end
  2635.                                 self:Aoe(hit.Position, 50)
  2636.                             until done == true
  2637.                         end)
  2638.                     end)
  2639.                     repeat game:GetService("RunService").PostSimulation:Wait() until not p2:IsDescendantOf(workspace)
  2640.                     done = true
  2641.                 end)
  2642.                 self.Attack = false
  2643.             end
  2644.             if(Data.Key == "v")and(not Data.Up)and(not self.AxeEnabled)then
  2645.                 self.Attack = true
  2646.                 leftarm.self.Sword.Transparency = .99
  2647.                 leftarm.self.Sword.Material = Enum.Material.Glass
  2648.                 leftarm.self.Sword.Highlight.Enabled = true
  2649.                 for i = 1, self:GetFramesToSecond(.7) do
  2650.                     self.Animate({
  2651.                         CFrame.new(-0.0529786237, 0, -0.00697433716, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.Angles(0,math.rad(-180),0),
  2652.                         CFrame.new(-1.59793985, 0.738437891, -0.365518063, 0.875000179, 0.129409432, -0.466506004, -0.129409432, -0.866025388, -0.482962996, -0.466506004, 0.482962996, -0.741025686)*CFrame.Angles(math.rad(0+5*math.cos(sin/33)),math.rad(0+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/40))),
  2653.                         CFrame.new(-0.551762879, -2, -0.193185553, 0.939692557, 0, 0.342020094, 0, 1, 0, -0.342020094, 0, 0.939692557),
  2654.                         CFrame.new(1.52579713, -0.0742611289, -0.423438966, 0.842993081, -0.31206122, -0.438155591, -0.0123708099, 0.803068221, -0.595758557, 0.537782013, 0.507640779, 0.673120499)*CFrame.Angles(math.rad(0+5*math.cos(sin/35)),math.rad(0+5*math.cos(sin/33)),math.rad(0+5*math.cos(sin/38))),
  2655.                         CFrame.new(0.570710957, -2, -0.12247543, 0.866025329, 0, -0.500000179, 0, 1, 0, 0.500000179, 0, 0.866025329),
  2656.                         CFrame.new(0.0788603872, 1.49999988, 0.0896173641, 0.965925872, 0.0449434146, 0.254886806, 0, 0.984807789, -0.173648164, -0.258818835, 0.167731255, 0.951251328)
  2657.                     }, .1 / self.FpsValue)
  2658.                     leftarm.self.Sword.Transparency = .99
  2659.                     leftarm.self.Sword.Material = Enum.Material.Glass
  2660.                     leftarm.self.Sword.Highlight.Enabled = true
  2661.                     game:GetService("RunService").PostSimulation:Wait()
  2662.                 end
  2663.                 self:SoundEffect(leftarm.self.Sword, 7171591581, 3, math.random(90, 110)/100, true)
  2664.                 for i = 1, self:GetFramesToSecond(.3) do
  2665.                     self.Animate({
  2666.                         CFrame.new(-0.0529786237, 0, -0.00697433716, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.Angles(0,math.rad(-180),0),
  2667.                         CFrame.new(-1.50579524, -0.147885561, -0.408005863, 0.97209996, 0.151094601, 0.179421127, 0.00389319658, 0.754406452, -0.656396031, -0.234534308, 0.638781071, 0.732770324)*CFrame.Angles(math.rad(0+5*math.cos(sin/35)),math.rad(0+5*math.cos(sin/33)),math.rad(0+5*math.cos(sin/38))),
  2668.                         CFrame.new(-0.551762879, -2, -0.193185553, 0.939692557, 0, 0.342020094, 0, 1, 0, -0.342020094, 0, 0.939692557),
  2669.                         CFrame.new(1.52579713, -0.0742611289, -0.423438966, 0.842993081, -0.31206122, -0.438155591, -0.0123708099, 0.803068221, -0.595758557, 0.537782013, 0.507640779, 0.673120499)*CFrame.Angles(math.rad(0+5*math.cos(sin/33)),math.rad(0+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/40))),
  2670.                         CFrame.new(0.570710957, -2, -0.12247543, 0.866025329, 0, -0.500000179, 0, 1, 0, 0.500000179, 0, 0.866025329),
  2671.                         CFrame.new(0.0529785305, 1.50000024, -0.00697511621, 0.965925872, -0.0225574989, 0.257833958, 0, 0.99619472, 0.0871555507, -0.258818835, -0.0841858014, 0.962250233)
  2672.                     }, .3 / self.FpsValue)
  2673.                     leftarm.self.Sword.Transparency = .99
  2674.                     leftarm.self.Sword.Material = Enum.Material.Glass
  2675.                     leftarm.self.Sword.Highlight.Enabled = true
  2676.                     game:GetService("RunService").PostSimulation:Wait()
  2677.                 end
  2678.                 self:SoundEffect(leftarm.self.Sword, 7171761940, 3, math.random(90, 110)/100, true)
  2679.                 local p = script.Stuff.SlashPart:Clone()
  2680.                 p.Parent = self.EffectModel
  2681.                 p.Anchored = true
  2682.                 p.CanCollide = false
  2683.                 p.CanTouch = false
  2684.                 p.CanQuery = false
  2685.                 p.Material = Enum.Material.Neon
  2686.                 p.Size = Vector3.new(.3,.1,80)
  2687.                 p.CFrame = self.CurrentPosition*CFrame.new(1.5,-3,(p.Size.Z/2)+5)
  2688.                 for i = 1, self:GetFramesToSecond(1) do
  2689.                     leftarm.self.Sword.Transparency = .99
  2690.                     leftarm.self.Sword.Material = Enum.Material.Glass
  2691.                     leftarm.self.Sword.Highlight.Enabled = true
  2692.                     game:GetService("RunService").PostSimulation:Wait()
  2693.                 end
  2694.                 self:ClientTween(p, TweenInfo.new(1), {
  2695.                     Transparency = 1
  2696.                 })
  2697.                 for i,v in next, p:GetChildren() do
  2698.                     pcall(function()
  2699.                         self:ClientTween(v, TweenInfo.new(1), {
  2700.                             Rate = 0,
  2701.                             Velocity = Vector3.new(v.Velocity.X,300,v.Velocity.Z)
  2702.                         })
  2703.                     end)
  2704.                     task.delay(1, function()
  2705.                         pcall(function()
  2706.                             v.Enabled = false
  2707.                         end)
  2708.                     end)
  2709.                 end
  2710.                 task.delay(5, pcall, game.Destroy, p)
  2711.                 task.delay(.3, function()
  2712.                     self:Aoe(p.CFrame, Vector3.new(10, 200, p.Size.Z))
  2713.                     for i = 1, p.Size.Z/2 do
  2714.                         local s = script.Stuff.Spike:Clone()
  2715.                         s.Parent = self.EffectModel
  2716.                         s.Size = Vector3.new(2,0,2)
  2717.                         s.Color = Color3.new(0,0,math.random())
  2718.                         s.Material = Enum.Material.Glass
  2719.                         s.CFrame = p.CFrame*CFrame.new(0,-(2+i)/2,(i*2)-(p.Size.Z/2))
  2720.                         local t = i/math.random(10,20)
  2721.                         local siz = 10+(i*(math.random(80, 200)/100))
  2722.                         self:ClientTween(s, TweenInfo.new(t), {
  2723.                             CFrame = p.CFrame*CFrame.new(0,siz/2,(i*2)-(p.Size.Z/2))*CFrame.Angles(math.rad(math.random(-10,10)), math.rad(math.random(-10,10)), math.rad(math.random(-10,10))),
  2724.                             Size = Vector3.new(2,siz,2)
  2725.                         })
  2726.                         task.delay(t/3,function()
  2727.                             self:SoundEffect(s, 4471648128, 3, math.random(80, 120)/100, false)
  2728.                         end)
  2729.                         task.delay(t+2, function()
  2730.                             self:ClientTween(s, TweenInfo.new((t/2)+1), {
  2731.                                 CFrame = p.CFrame*CFrame.new(0,-siz/2,(i*2)-(p.Size.Z/2))*CFrame.Angles(math.rad(math.random(-10,10)), math.rad(math.random(-10,10)), math.rad(math.random(-10,10))),
  2732.                                 Size = Vector3.new(2,0,2)
  2733.                             })
  2734.                             task.delay((t/2)+1, pcall, game.Destroy, s)
  2735.                         end)
  2736.                     end
  2737.                 end)
  2738.                 leftarm.self.Sword.Transparency = 1
  2739.                 leftarm.self.Sword.Material = Enum.Material.Plastic
  2740.                 leftarm.self.Sword.Highlight.Enabled = false
  2741.                 self.Attack = false
  2742.             end
  2743.             if(Data.Key == "leftcontrol")and(not Data.Up)then
  2744.                 if(self.WalkSpeed == 16)then
  2745.                     self.WalkSpeed = 32
  2746.                 else
  2747.                     self.WalkSpeed = 16
  2748.                 end
  2749.             end
  2750.             if(Data.Key == "m")and(not Data.Up)then
  2751.                 self.Muted = not self.Muted
  2752.             end
  2753.             if(Data.Key == "t")and(not Data.Up)then
  2754.                 local taunts = {
  2755.                     {
  2756.                         Id = 966261603,
  2757.                         Text = "My vision for the world shall be realized."
  2758.                     },
  2759.                     {
  2760.                         Id = 966262774,
  2761.                         Text = "Don't you dare keep me waiting."
  2762.                     },
  2763.                     {
  2764.                         Id = 966264954,
  2765.                         Text = "Feel the fury of a god!"
  2766.                     },
  2767.                     {
  2768.                         Id = 966268002,
  2769.                         Text = "You will kneel before me."
  2770.                     },
  2771.                     {
  2772.                         Id = 966269704,
  2773.                         Text = "A peaceful world has no need for humans. You're pointless!"
  2774.                     },
  2775.                     {
  2776.                         Id = 966270845,
  2777.                         Text = "How dare you defy a god."
  2778.                     }
  2779.                 }
  2780.                 local t = taunts[math.random(1,#taunts)]
  2781.                 self:SoundEffect(head.self, t.Id, 8, math.random(90,110)/100, true)
  2782.                 chatfunc(t.Text)
  2783.             end
  2784.             if(Data.Key == "semicolon")and(not Data.Up)then
  2785.                 self.Killaura = not self.Killaura
  2786.                 chatfunc("Killaura = "..tostring(self.Killaura))
  2787.             end
  2788.             if(Data.Key == "q")and(not Data.Up)then
  2789.                 self:Effect(self.CurrentPosition.Position, 0, Vector3.new(5,5,5), Color3.new(0,0,1), 2, {
  2790.                     Transparency = 1,
  2791.                     Color = Color3.new(),
  2792.                     Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2793.                 },{
  2794.                     Scale = Vector3.new()
  2795.                 })
  2796.                 self:Effect(self.MouseHit.Position+Vector3.new(0,3.1,0), 0, Vector3.new(5,5,5), Color3.new(0,0,1), 2, {
  2797.                     Transparency = 1,
  2798.                     Color = Color3.new(),
  2799.                     Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2800.                 },{
  2801.                     Scale = Vector3.new()
  2802.                 })
  2803.                 for i = 1,3 do
  2804.                     self:Lightning(self.CurrentPosition.Position, self.MouseHit.Position+Vector3.new(0,3.1,0), 1, 5, Color3.new(0,0,1), .3)
  2805.                 end
  2806.                 self.CurrentPosition = CFrame.new(self.MouseHit.Position+Vector3.new(0,3.1,0))
  2807.                 self.FakeCurrentPosition = self.CurrentPosition
  2808.             end
  2809.             if(Data.Key == "x")and(not Data.Up)and(not self.AxeEnabled)then
  2810.                 self.Attack = true
  2811.                 local orighit = self.MouseHit.Position
  2812.                 local part = Instance.new("Part", self.EffectModel)
  2813.                 part.Anchored = true
  2814.                 part.CanCollide = false
  2815.                 part.CanQuery = false
  2816.                 part.Color = Color3.new(0,0,math.random())
  2817.                 part.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2818.                 part.Position = (leftarm.self.CFrame*CFrame.new(0,-1,0)).Position
  2819.                 part.Size = Vector3.new(.5,.5,.5)
  2820.                 part.Material = Enum.Material.Glass
  2821.                 self:SoundEffect(leftarm.self, 3750951732, 1, math.random(90,110)/100, true)
  2822.                 for i = 1, self:GetFramesToSecond(1.5) do
  2823.                     self.Animate({
  2824.                         CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(20),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2825.                         CFrame.new(-1.5,0+.1*math.cos(sin/36),0.5)*CFrame.Angles(math.rad(-50+5*math.cos(sin/32)),math.rad(20+5*math.cos(sin/35)),math.rad(10+5*math.cos(sin/34))),
  2826.                         CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10+1*math.cos(sin/54)),math.rad(0+1*math.cos(sin/50))),
  2827.                         CFrame.new(1.5,0+1-.1*math.cos(sin/35),0)*CFrame.Angles(math.rad(180+5*math.cos(sin/34)),math.rad(0+5*math.cos(sin/38)),math.rad(5-5*math.cos(sin/32))),
  2828.                         CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-10-1*math.cos(sin/56)),math.rad(0-1*math.cos(sin/53))),
  2829.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/31)),math.rad(-20+3*math.cos(sin/35)),math.rad(0-3*math.cos(sin/39))),
  2830.                     },.1 / self.FpsValue)
  2831.                     self:Effect(leftarm.self.CFrame*CFrame.new(math.random(-2,2),-1+math.random(-2,2),math.random(-2,2)), 0, Vector3.new(.3,.3,.3), Color3.new(0,0,math.random()), 1, {
  2832.                         Position = (leftarm.self.CFrame*CFrame.new(0,-1,0)).Position,
  2833.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2834.                         Transparency = 1
  2835.                     },{
  2836.                         Scale = Vector3.new(0,0,0)
  2837.                     })
  2838.                     part.Position = (leftarm.self.CFrame*CFrame.new(0,-1,0)).Position
  2839.                     game:GetService("RunService").PostSimulation:Wait()
  2840.                 end
  2841.                 for i = 1, self:GetFramesToSecond(.3) do
  2842.                     self.Animate({
  2843.                         CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(-20),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2844.                         CFrame.new(-1.5,0.2+.1*math.cos(sin/36),-0.5)*CFrame.Angles(math.rad(80+5*math.cos(sin/32)),math.rad(-20+5*math.cos(sin/35)),math.rad(-20+5*math.cos(sin/34))),
  2845.                         CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10+1*math.cos(sin/54)),math.rad(0+1*math.cos(sin/50))),
  2846.                         CFrame.new(1.5,0+1-.1*math.cos(sin/35),0)*CFrame.Angles(math.rad(180+5*math.cos(sin/34)),math.rad(0+5*math.cos(sin/38)),math.rad(5-5*math.cos(sin/32))),
  2847.                         CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-10-1*math.cos(sin/56)),math.rad(0-1*math.cos(sin/53))),
  2848.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/31)),math.rad(20+3*math.cos(sin/35)),math.rad(0-3*math.cos(sin/39))),
  2849.                     },.3 / self.FpsValue)
  2850.                     part.Position = (leftarm.self.CFrame*CFrame.new(0,-1,0)).Position
  2851.                     game:GetService("RunService").PostSimulation:Wait()
  2852.                 end
  2853.                 self:SoundEffect(leftarm.self, 608600954, 3, math.random(90,110)/100, true)
  2854.                 local pos = orighit+Vector3.new(0,40+math.random(-2,2),0)
  2855.                 local mag = (pos - orighit).Magnitude
  2856.                 local bez = bezier.new((leftarm.self.CFrame*CFrame.new(0,-1,0)).Position,pos+Vector3.new(0,mag*2,0),pos)
  2857.                 task.spawn(function()
  2858.                     for i = 0, 1, 1/240 do
  2859.                         for i = 1, self:GetFramesToSecond(1/240) do
  2860.                             game:GetService("RunService").PostSimulation:Wait()
  2861.                         end
  2862.                     end
  2863.                     for i = 1, self:GetFramesToSecond(.3) do
  2864.                         self.Animate({
  2865.                             CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(50),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2866.                             CFrame.new(-1.5,0+.1*math.cos(sin/36),0)*CFrame.Angles(math.rad(0+5*math.cos(sin/32)),math.rad(30+5*math.cos(sin/35)),math.rad(-5+5*math.cos(sin/34))),
  2867.                             CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10),math.rad(0)),
  2868.                             CFrame.new(1.5+.5,0+.3-.1*math.cos(sin/35),-0.3)*CFrame.Angles(math.rad(100+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/30)),math.rad(50-5*math.cos(sin/32))),
  2869.                             CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-30),math.rad(0)),
  2870.                             CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-50+1*math.cos(sin/35)),math.rad(0-1*math.cos(sin/33))),
  2871.                         },.3 / self.FpsValue)
  2872.                         game:GetService("RunService").PostSimulation:Wait()
  2873.                     end
  2874.                     for i = 1, self:GetFramesToSecond(.6) do
  2875.                         game:GetService("RunService").PostSimulation:Wait()
  2876.                     end
  2877.                     repeat game:GetService("RunService").PostSimulation:Wait() until (part.Position == pos) or (not part or not part:IsDescendantOf(workspace))
  2878.                     self:SpawnTrail(rightarm.self.HandCannon.Hole.Position, part.Position, Color3.new(0,0,1), .5)
  2879.                     self:SoundEffect(rightarm.self.HandCannon.Hole, 9058737882, 2, math.random(90,110)/100, true)
  2880.                     self:SoundEffect(rightarm.self.HandCannon.Hole, 9060276709, 1, math.random(90,110)/100, true)
  2881.                     self.SmokeTime += self:GetFramesToSecond(3)
  2882.                     for i = 1,math.random(1,20) do
  2883.                         self:Effect(rightarm.self.HandCannon.Hole.Position, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), .5, {
  2884.                             Transparency = 1,
  2885.                             Color = Color3.new(),
  2886.                             Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2887.                             Position = rightarm.self.HandCannon.Hole.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  2888.                         },{
  2889.                             Scale = Vector3.new()
  2890.                         })
  2891.                         self:Effect(part.Position, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), .5, {
  2892.                             Transparency = 1,
  2893.                             Color = Color3.new(),
  2894.                             Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2895.                             Position = self.MouseHit.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  2896.                         },{
  2897.                             Scale = Vector3.new()
  2898.                         })
  2899.                     end
  2900.                     self:Effect(part.Position, 0, Vector3.new(10,10,10), Color3.new(0,0,math.random()), 2, {
  2901.                         Transparency = 1,
  2902.                         Color = Color3.new(),
  2903.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2904.                     },{
  2905.                         Scale = Vector3.new()
  2906.                     })
  2907.                     for i = 1, self:GetFramesToSecond(.3) do
  2908.                         self.Animate({
  2909.                             CFrame.new(0,0+.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(0),math.rad(50),math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  2910.                             CFrame.new(-1.5,0+.1*math.cos(sin/36),0)*CFrame.Angles(math.rad(0+5*math.cos(sin/32)),math.rad(30+5*math.cos(sin/35)),math.rad(-5+5*math.cos(sin/34))),
  2911.                             CFrame.new(-0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(10),math.rad(0)),
  2912.                             CFrame.new(1.5+.5,0+.3-.1*math.cos(sin/35),-0.3)*CFrame.Angles(math.rad(130+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/30)),math.rad(50-5*math.cos(sin/32))),
  2913.                             CFrame.new(0.5,-2-.1*math.cos(sin/30),0+math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-30),math.rad(0)),
  2914.                             CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)),math.rad(-50+1*math.cos(sin/35)),math.rad(0-1*math.cos(sin/33))),
  2915.                         },.3 / self.FpsValue)
  2916.                         game:GetService("RunService").PostSimulation:Wait()
  2917.                     end
  2918.                     self.Attack = false
  2919.                 end)
  2920.                 for i = 0, 1, 1/60 do
  2921.                     local pos = bez.calc(i)
  2922.                     part.CFrame = CFrame.lookAt(part.Position, pos)
  2923.                     part.Position = pos
  2924.                     for i = 1, self:GetFramesToSecond(1/60) do
  2925.                         game:GetService("RunService").PostSimulation:Wait()
  2926.                     end
  2927.                 end
  2928.                 self:SoundEffect(part, 4458749278, 10, math.random(90,110)/100, true)
  2929.                 pcall(game.Destroy,part)
  2930.                 for i = 1, 40 do
  2931.                     local siz = math.random(40, 60)
  2932.                     local siz2 = math.random(40, 60)
  2933.                     self:Effect(pos, 0, Vector3.new(siz, 1, siz2), Color3.new(0,0,math.random()), 2, {
  2934.                         Transparency = 1,
  2935.                         Color = Color3.new(),
  2936.                         Orientation = Vector3.new(math.random(-10,10),math.random(-360,360),math.random(-10,10))
  2937.                     }, {
  2938.                         Scale = Vector3.new()
  2939.                     })
  2940.                     local posa = pos+Vector3.new(math.random(-siz,siz)/2,0,math.random(-siz2,siz2)/2)
  2941.                     local hit, pos2 = self:Raycast(posa, posa+Vector3.new(math.random(-siz,siz),-99999,math.random(-siz2,siz2)), 999999, self.Ignore)
  2942.                     if(hit)then
  2943.                         local cf = CFrame.lookAt(pos+Vector3.new(math.random(-siz,siz)/2,0,math.random(-siz2,siz2)/2), pos2)
  2944.                         local mag = (cf.Position - pos2).Magnitude
  2945.                         self:Effect(cf, 0, Vector3.new(.5,.5,.5), Color3.new(0,0,math.random()), mag/70, {
  2946.                             Position = pos2,
  2947.                             Color = Color3.new()
  2948.                         },{
  2949.                             Scale = Vector3.new(.5,.5,5)*20
  2950.                         })
  2951.                         task.delay(mag/70,function()
  2952.                             local part = Instance.new("Part", self.EffectModel)
  2953.                             part.Anchored = true
  2954.                             part.CanCollide = false
  2955.                             part.CanQuery = false
  2956.                             part.Color = Color3.new(0,0,math.random())
  2957.                             part.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2958.                             part.Position = pos2
  2959.                             part.Size = Vector3.new(1,1,1)
  2960.                             part.Material = Enum.Material.Glass
  2961.                             part.Transparency = 1
  2962.                             self:SoundEffect(part, 3750959938, 5, math.random(90,110)/100, true)
  2963.                             game:GetService("Debris"):AddItem(part,0)
  2964.                             self:Effect(pos2, 0, Vector3.new(math.random(5,10),math.random(5,10),math.random(5,10)), Color3.new(0,0,math.random()), math.random(1,2), {
  2965.                                 Transparency = 1,
  2966.                                 Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  2967.                                 Color = Color3.new()
  2968.                             },{
  2969.                                 Scale = Vector3.new(0,0,0)
  2970.                             })
  2971.                             self:Aoe(pos2, 15)
  2972.                             for i = 1, math.random(1,5) do
  2973.                                 local randompos = math.random(-30,30)
  2974.                                 local randompos2 = math.random(-30,30)
  2975.                                 local yrand = math.random(15,30)
  2976.                                 local hit, pos3 = self:Raycast(pos2+Vector3.new(randompos,yrand,randompos2), pos2+Vector3.new(randompos,-9999,randompos2), 999999, self.Ignore)
  2977.                                 local poss1, poss2, poss3 = pos2, pos2+Vector3.new(randompos,yrand,randompos2), pos3
  2978.                                 local bez = bezier.new(poss1,poss2,poss3)
  2979.                                 local part = Instance.new("Part", self.EffectModel)
  2980.                                 part.Anchored = true
  2981.                                 part.CanCollide = false
  2982.                                 part.CanQuery = false
  2983.                                 part.Color = Color3.new(0,0,math.random())
  2984.                                 part.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  2985.                                 part.Position = poss1
  2986.                                 part.Size = Vector3.new(1,1,1)
  2987.                                 part.Material = Enum.Material.Glass
  2988.                                 task.spawn(function()
  2989.                                     local t = math.random(50,70)
  2990.                                     for i = 0, 1, 1/t do
  2991.                                         local pos = bez.calc(i)
  2992.                                         part.CFrame = CFrame.lookAt(part.Position, pos)
  2993.                                         part.Position = pos
  2994.                                         for i = 1, self:GetFramesToSecond(1/t) do
  2995.                                             game:GetService("RunService").PostSimulation:Wait()
  2996.                                         end
  2997.                                     end
  2998.                                     local posss = part.Position
  2999.                                     self:SoundEffect(part, 8388603871, math.random(1,3)/2, math.random(90,110)/100, true)
  3000.                                     pcall(game.Destroy,part)
  3001.                                     self:Effect(posss, 0, Vector3.new(5,5,5), Color3.new(0,0,math.random()), math.random(), {
  3002.                                         Transparency = 1,
  3003.                                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  3004.                                         Color = Color3.new(0,0,0)
  3005.                                     },{
  3006.                                         Scale = Vector3.new()
  3007.                                     })
  3008.                                     self:Aoe(posss, 7)
  3009.                                 end)
  3010.                             end
  3011.                         end)
  3012.                     end
  3013.                     task.wait(0.1)
  3014.                 end
  3015.             end
  3016.             if(Data.Key == "n")and(not Data.Up)then
  3017.                 if(self.Ids[self.SoundIdNum+1])then
  3018.                     self.SoundIdNum += 1
  3019.                 else
  3020.                     self.SoundIdNum = 1
  3021.                 end
  3022.             end
  3023.             if(Data.Key == "quote")and(not Data.Up)then
  3024.                 self.ClientAoe = not self.ClientAoe
  3025.                 chatfunc("ClientAoe = "..tostring(self.ClientAoe))
  3026.             end
  3027.             if(Data.Key == "l")and(not Data.Up)then
  3028.                 self.Pitch = self.Pitch == 0.8 and 1 or 0.8
  3029.                 chatfunc("Pitch = "..tostring(self.Pitch))
  3030.             end
  3031.             if(Data.Key == "k")and(not Data.Up)then
  3032.                 self.KillMethod += 1
  3033.                 if(self.KillMethod > #self.KillMethods)then
  3034.                     self.KillMethod = 1
  3035.                 end
  3036.                 chatfunc("Kill method = "..self.KillMethods[self.KillMethod].Name)
  3037.             end
  3038.             if(Data.Key == "j")and(not Data.Up)then
  3039.                 self.DecimateMethod += 1
  3040.                 if(self.DecimateMethod > #self.DecimateMethods)then
  3041.                     self.DecimateMethod = 1
  3042.                 end
  3043.                 chatfunc("Decimate method = "..self.DecimateMethods[self.DecimateMethod].Name)
  3044.             end
  3045.             if(Data.Key == "h")and(not Data.Up)then
  3046.                 Decimated = {}
  3047.                 for i,v in next, self.DecimateConnections do
  3048.                     pcall(function()
  3049.                         v:Disconnect()
  3050.                     end)
  3051.                 end
  3052.                 self.DecimateConnections = {}
  3053.                 chatfunc("Cleared decimate table.")
  3054.             end
  3055.             if(Data.Key == "g")and(not Data.Up)then
  3056.                 self.RefitMethod += 1
  3057.                 if(self.RefitMethod > #self.RefitMethods)then
  3058.                     self.RefitMethod = 1
  3059.                 end
  3060.                 refitcore:SetMethod(self.RefitMethods[self.RefitMethod])
  3061.                 chatfunc("Refit method = "..self.RefitMethods[self.RefitMethod])
  3062.             end
  3063.             if(Data.Key == "e")and(not Data.Up)then
  3064.                 self.AxeEnabled = not self.AxeEnabled
  3065.                 if(self.AxeEnabled)then
  3066.                     axe.self:Destroy()
  3067.                 else
  3068.                     rightarm.self:Destroy()
  3069.                 end
  3070.             end
  3071.             if(Data.Key == "z")and(not Data.Up)and(self.AxeEnabled)then
  3072.                 self.Attack = true
  3073.                 for i = 1, self:GetFramesToSecond(1) do
  3074.                     self.Animate({
  3075.                         CFrame.new(-5.8952719e-07, -0.15160726, -0.0387812965, 0.98480773, 0, 0.173648179, 0.0151344351, 0.99619472, -0.0858316422, -0.172987401, 0.087155737, 0.981060266)*CFrame.Angles(math.rad(-10),math.rad(-180),0),
  3076.                         CFrame.new(-1.2908144, -0.0949745774, 0.448598742, 0.906307697, -0.298836291, 0.298836172, 0, 0.707106769, 0.707106948, -0.4226183, -0.640856504, 0.640856266),
  3077.                         CFrame.new(-0.586508811, -1.84620976, 0.00386648625, 0.939362228, 0.0151344351, 0.342592359, -0.0435778648, 0.99619472, 0.0754790828, -0.340146363, -0.0858316422, 0.936447203),
  3078.                         CFrame.new(1.60388672, 0.609986782, -0.589171946, 0.98480767, -0.157378703, 0.0733871013, 1.89070533e-07, -0.42261833, -0.906307757, 0.173648253, 0.892538965, -0.416197717),
  3079.                         CFrame.new(0.533532739, -1.86271262, 0.00982183218, 0.939807177, 0.0151344351, -0.341369599, 0.0151344547, 0.99619472, 0.0858316347, 0.341369629, -0.0858316422, 0.936001897),
  3080.                         CFrame.new(6.40749931e-07, 1.49999952, -2.38418579e-07, 0.98480773, -0.0151344361, -0.172987416, 0, 0.99619478, -0.087155737, 0.173648179, 0.0858316422, 0.981060266),
  3081.                         CFrame.new(0.600942433, 1.02222443, -3.29460645, 0.0996003002, 0.142244399, 0.984807074, -0.819151103, 0.573576033, 5.73565501e-07, -0.564861298, -0.806706071, 0.173648477)
  3082.                     }, .1 / self.FpsValue)
  3083.                     game:GetService("RunService").PostSimulation:Wait()
  3084.                 end
  3085.                 self:SoundEffect(axe.self, 6241709963, 3, 1, true)
  3086.                 for i = 1, self:GetFramesToSecond(.2) do
  3087.                     self.Animate({
  3088.                         CFrame.new(-2.5331974e-07, -0.132146403, -0.159132719, 0.98480773, 0, 0.173648179, -0.0151344026, 0.99619472, 0.0858314484, -0.172987401, -0.0871555433, 0.981060266)*CFrame.Angles(math.rad(10),math.rad(-180),0),
  3089.                         CFrame.new(-1.290815, -0.0949756801, 0.448599339, 0.906307697, -0.298836261, 0.298836172, 3.7252903e-09, 0.707106769, 0.707106948, -0.42261827, -0.640856445, 0.640856206),
  3090.                         CFrame.new(-0.551085234, -1.86638451, -0.19703275, 0.939362228, -0.0151344026, 0.342592359, 0.0435777679, 0.99619472, -0.0754789189, -0.340146363, 0.0858314484, 0.936447203),
  3091.                         CFrame.new(1.51297235, 0.111889355, -0.649452448, 0.98480767, -0.150383726, -0.0868238956, 1.80666987e-07, 0.500000119, -0.866025388, 0.173648059, 0.852868438, 0.492403984),
  3092.                         CFrame.new(0.568956316, -1.84988165, -0.191077381, 0.939807177, -0.0151344026, -0.341369599, -0.0151344212, 0.99619472, -0.0858314484, 0.341369629, 0.0858314484, 0.936001897),
  3093.                         CFrame.new(2.64495611e-07, 1.50000024, -5.96046448e-08, 0.98480773, 0.0151343998, -0.172987416, 0, 0.99619478, 0.0871555358, 0.173648179, -0.0858314559, 0.981060266),
  3094.                         CFrame.new(0,-.2,0)*CFrame.new(0.402386904, -4.31485748, -1.59267914, -0.142244518, 0.0996005833, 0.984807193, -0.573575318, -0.819150686, 3.99600793e-07, 0.806706607, -0.564861715, 0.173647866)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10))
  3095.                     }, .3 / self.FpsValue)
  3096.                     game:GetService("RunService").PostSimulation:Wait()
  3097.                 end
  3098.                 local p = {
  3099.                     Size = Vector3.new(0,0,40),
  3100.                     CFrame = self.CurrentPosition*CFrame.new(-1.5,-3,(40/2)+5)
  3101.                 }
  3102.                 self:Aoe(p.CFrame, Vector3.new(p.Size.Z*1.3, 50, p.Size.Z))
  3103.                 for i = 1, p.Size.Z/2 do
  3104.                     local s = script.Stuff.Spike:Clone()
  3105.                     s.Parent = self.EffectModel
  3106.                     s.Size = Vector3.new(2,0,2)
  3107.                     s.Color = Color3.new(0,0,math.random())
  3108.                     s.Material = Enum.Material.Glass
  3109.                     local x = math.random(-i,i)
  3110.                     s.CFrame = p.CFrame*CFrame.new(x,-(2+i)/2,(i*2)-(p.Size.Z/2))
  3111.                     local t = i/math.random(10,20)
  3112.                     local siz = 1+(i*(math.random(80, 200)/100))
  3113.                     self:ClientTween(s, TweenInfo.new(t), {
  3114.                         CFrame = p.CFrame*CFrame.new(x,siz/2,(i*2)-(p.Size.Z/2))*CFrame.Angles(math.rad(math.random(-10,10)), math.rad(math.random(-10,10)), math.rad(math.random(-10,10))),
  3115.                         Size = Vector3.new(2,siz,2)
  3116.                     })
  3117.                     task.delay(t/3,function()
  3118.                         self:SoundEffect(s, 4471648128, 3, math.random(80, 120)/100, false)
  3119.                     end)
  3120.                     task.delay(t+2, function()
  3121.                         self:ClientTween(s, TweenInfo.new((t/2)+1), {
  3122.                             CFrame = p.CFrame*CFrame.new(x,-siz/2,(i*2)-(p.Size.Z/2))*CFrame.Angles(math.rad(math.random(-10,10)), math.rad(math.random(-10,10)), math.rad(math.random(-10,10))),
  3123.                             Size = Vector3.new(2,0,2)
  3124.                         })
  3125.                         task.delay((t/2)+1, pcall, game.Destroy, s)
  3126.                     end)
  3127.                 end
  3128.                 task.wait(.5)
  3129.                 self.Attack = false
  3130.             end
  3131.         elseif(Type == "CameraCFrame")then
  3132.             self.CameraCFrame = Data.CFrame
  3133.         elseif(Type == "ShiftLock")then
  3134.             self.ShiftLock = Data.Value
  3135.         elseif(Type == "Destroy")then
  3136.             pcall(game.Destroy,Data)
  3137.         end
  3138.     end
  3139.  
  3140.     remote = nil
  3141.     self:AddRefit(getfenv(), "remote", Instance.new("RemoteEvent"), {
  3142.         OnDestroy = function()
  3143.             table.insert(self.Connections, remote.self.OnServerEvent:Connect(self.RemoteFuncs))
  3144.         end,
  3145.         Properties = {
  3146.             Parent = game:GetService("ReplicatedStorage"),
  3147.             Name = "__FakeChar"..self:GetCurrentPlayer().UserId,
  3148.         }
  3149.     })
  3150.     table.insert(self.Connections, remote.self.OnServerEvent:Connect(self.RemoteFuncs))
  3151.     remotefunction = nil
  3152.     self:AddRefit(getfenv(), "remotefunction", Instance.new("RemoteFunction"), {
  3153.         Properties = {
  3154.             Parent = game:GetService("ReplicatedStorage"),
  3155.             Name = "__FakeCharRemoteFunction"..self:GetCurrentPlayer().UserId
  3156.         }
  3157.     })
  3158.  
  3159.     self.Remote = remote.self
  3160.     self.RemoteFunction = remotefunction.self
  3161.     self.Torso = CFrame.new()
  3162.     self.CurrentPosition = CFrame.new(0,5,0)
  3163.     self.FakeCurrentPosition = self.CurrentPosition
  3164.     self.LastPosition = self.CurrentPosition
  3165.     self.FakeLastPosition = self.FakeCurrentPosition
  3166.     self.Falling = false
  3167.     self.Velocity = Vector3.new()
  3168.     self.Jumping = false
  3169.     self.Walking = false
  3170.     self.Attack = false
  3171.     self.Flying = false
  3172.  
  3173.  
  3174.     self.UpdateIgnore = function()
  3175.         self.Ignore = {head.self, leftarm.self, leftleg.self, rightarm.self, rightleg.self, torso.self, campart.self, headval.self, axe.self, remote.self, remotefunction.self, self.EffectModel}
  3176.     end
  3177.     self.UpdateIgnore()
  3178.  
  3179.     -- -- -- -- -- -- -- -- -- -- -- -- -- --
  3180.  
  3181.     self.Animate = function(tbl, time)
  3182.         pcall(function()
  3183.             self.Torso = self.Torso:Lerp(tbl[1], time)
  3184.             self.LeftArm = self.LeftArm:Lerp(tbl[2], time)
  3185.             self.LeftLeg = self.LeftLeg:Lerp(tbl[3], time)
  3186.             self.RightArm = self.RightArm:Lerp(tbl[4], time)
  3187.             self.RightLeg = self.RightLeg:Lerp(tbl[5], time)
  3188.             self.Head = self.Head:Lerp(tbl[6], time)
  3189.             self.Axe = self.Axe:Lerp(tbl[7], time)
  3190.         end)
  3191.     end
  3192.  
  3193.     self.WeaponCheck = function()
  3194.         if(not self.AxeEnabled)then
  3195.             axe.ModifyProperty("Transparency", 1)
  3196.             for i,v in next, axe.self:GetChildren() do
  3197.                 pcall(function()
  3198.                     if(typeof(v.Transparency) == "NumberSequence")then
  3199.                         v.Transparency = NumberSequence.new(1)
  3200.                     end
  3201.                 end)
  3202.                
  3203.                 pcall(function()
  3204.                     if(typeof(v.Transparency) == "number")then
  3205.                         v.Transparency = 1
  3206.                     end
  3207.                 end)
  3208.             end
  3209.         else
  3210.             axe.ModifyProperty("Transparency", 0)
  3211.             for i,v in next, rightarm.self.HandCannon:GetDescendants() do
  3212.                 pcall(function()
  3213.                     if(typeof(v.Transparency) == "number")then
  3214.                         v.Transparency = 1
  3215.                     end
  3216.                 end)
  3217.             end
  3218.         end
  3219.     end
  3220.  
  3221.     local c2 = self:GetFramesToSecond(1/80)
  3222.     local c = 0
  3223.     local b2 = self:GetFramesToSecond(1/60)
  3224.     local b = 0
  3225.     local d2 = self:GetFramesToSecond(1/60)
  3226.     local d = 0
  3227.     local a2 = self:GetFramesToSecond(0.2)
  3228.     local a = 0
  3229.     local e2 = self:GetFramesToSecond(1/60)
  3230.     local e = 0
  3231.     local Step = "R"
  3232.     local mus2 = nil
  3233.     local mus2id = 3619734707
  3234.     local mus2vol = 1
  3235.     local mus2pit = .8
  3236.     local mus2tp = 0
  3237.    
  3238.     local Client = NLS([[
  3239.     task.wait()
  3240.     script.Parent = nil
  3241.    
  3242.     local plr = game:GetService("Players").LocalPlayer
  3243. local mouse = plr:GetMouse()
  3244. local uis = game:GetService('UserInputService')
  3245. local Remote = game:GetService('ReplicatedStorage'):FindFirstChild("__FakeChar"..plr.UserId)
  3246. local RemoteFunction = game:GetService('ReplicatedStorage'):FindFirstChild("__FakeCharRemoteFunction"..plr.UserId)
  3247. local LastRemote = Remote
  3248. local scriptStopped = false
  3249. local connections = {}
  3250. local objectsforcanquery = {}
  3251. local changedconnections = {}
  3252. local CameraPosition, CameraRotation, CameraZoom, CameraCFrame, lastZoom = Vector3.new(), Vector2.new(0,-15), 15, CFrame.new(), 15
  3253. local shiftlocked =  game:GetService("UserInputService").MouseBehavior == Enum.MouseBehavior.LockCenter
  3254.  
  3255. table.insert(connections, uis.InputBegan:Connect(function(io, gpe)
  3256.     if (io.KeyCode == Enum.KeyCode.LeftShift or io.KeyCode == Enum.KeyCode.RightShift) and not uis:GetFocusedTextBox() then
  3257.         shiftlocked = not shiftlocked
  3258.     end
  3259.     if(gpe)then
  3260.         return
  3261.     end
  3262.     if(Remote)then
  3263.         Remote:FireServer("Mouse", {
  3264.             Key = string.lower(io.KeyCode.Name),
  3265.             Hit = mouse.Hit,
  3266.             Target = mouse.Target,
  3267.             Up = false
  3268.         })
  3269.     end
  3270.     if io.KeyCode == Enum.KeyCode.I then
  3271.         if CameraZoom > 1 then
  3272.             CameraZoom = CameraZoom*.8
  3273.         else
  3274.             CameraZoom = 0
  3275.         end
  3276.     elseif io.KeyCode == Enum.KeyCode.O then
  3277.         if CameraZoom >= 1 then
  3278.             CameraZoom = CameraZoom*1.25
  3279.         else
  3280.             CameraZoom = 1
  3281.         end
  3282.     end
  3283.     if io.UserInputType == Enum.UserInputType.MouseWheel then
  3284.         if io.Position.Z > 0 then
  3285.             if CameraZoom > 1 then
  3286.                 CameraZoom = CameraZoom*.8
  3287.             else
  3288.                 CameraZoom = 0
  3289.             end
  3290.         else
  3291.             if CameraZoom >= 1 then
  3292.                 CameraZoom = CameraZoom*1.25
  3293.             else
  3294.                 CameraZoom = 1
  3295.             end
  3296.         end
  3297.     end
  3298. end))
  3299.  
  3300. table.insert(connections, uis.InputEnded:Connect(function(io, gpe)
  3301.     if(gpe)then
  3302.         return
  3303.     end
  3304.     if(Remote)then
  3305.         Remote:FireServer("Mouse", {
  3306.             Key = string.lower(io.KeyCode.Name),
  3307.             Hit = mouse.Hit,
  3308.             Target = mouse.Target,
  3309.             Up = true
  3310.         })
  3311.     end
  3312. end))
  3313.  
  3314. table.insert(connections, game:GetService("UserInputService"):GetPropertyChangedSignal("MouseBehavior"):Connect(function()
  3315.     local MouseBehavior = game:GetService("UserInputService").MouseBehavior.Value
  3316.     if CameraZoom == 0 then
  3317.         game:GetService("UserInputService").MouseBehavior = 1
  3318.     elseif game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  3319.         game:GetService("UserInputService").MouseBehavior = 2
  3320.     elseif uis:IsKeyDown(Enum.KeyCode.LeftShift)then
  3321.         game:GetService("UserInputService").MouseBehavior = 1
  3322.     else
  3323.         if(not shiftlocked)then
  3324.             game:GetService("UserInputService").MouseBehavior = 0
  3325.         else
  3326.             game:GetService("UserInputService").MouseBehavior = 1
  3327.         end
  3328.     end
  3329. end))
  3330.  
  3331. table.insert(connections, game:GetService("UserInputService"):GetPropertyChangedSignal("MouseDeltaSensitivity"):Connect(function()
  3332.     if game:GetService("UserInputService").MouseDeltaSensitivity ~= 1 then
  3333.         game:GetService("UserInputService").MouseDeltaSensitivity = 1
  3334.     end
  3335. end))
  3336.  
  3337. table.insert(connections, game:GetService("UserInputService").InputChanged:Connect(function(Input,Ignore)
  3338.     if Input.UserInputType == Enum.UserInputType.MouseWheel then
  3339.         if Ignore then
  3340.             return
  3341.         end
  3342.         if Input.Position.Z > 0 then
  3343.             if CameraZoom > 1 then
  3344.                 CameraZoom = CameraZoom*.8
  3345.             else
  3346.                 CameraZoom = 0
  3347.             end
  3348.         else
  3349.             if CameraZoom >= 1 then
  3350.                 CameraZoom = CameraZoom*1.25
  3351.             else
  3352.                 CameraZoom = 1
  3353.             end
  3354.         end
  3355.     end
  3356. end))
  3357.  
  3358. function ClientFuncs(type, tbl)
  3359.     if(type == "End")then
  3360.         scriptStopped = true
  3361.         for i,v in next, connections do
  3362.             pcall(function()
  3363.                 v:Disconnect()
  3364.             end)
  3365.         end
  3366.         for i,v in next, changedconnections do
  3367.             pcall(function()
  3368.                 v:Disconnect()
  3369.             end)
  3370.         end
  3371.         workspace.CurrentCamera:Destroy()
  3372.         game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
  3373.     end
  3374. end
  3375.  
  3376. function CanQueryChangedConnect(obj)
  3377.     pcall(function()
  3378.         obj.CanQuery = true
  3379.         obj.CanTouch = true
  3380.         obj.CanCollide = true
  3381.     end)
  3382.     changedconnections[obj] = obj.Changed:Connect(function()
  3383.         pcall(function()
  3384.             obj.CanQuery = true
  3385.             obj.CanTouch = true
  3386.             obj.CanCollide = true
  3387.         end)
  3388.     end)
  3389.     table.insert(objectsforcanquery, obj)
  3390. end
  3391.  
  3392. for i,v in next, workspace:GetDescendants() do
  3393.     if(v:IsA("BasePart"))then
  3394.         CanQueryChangedConnect(v)
  3395.     end
  3396. end
  3397.  
  3398. table.insert(connections, workspace.DescendantAdded:Connect(function(v)
  3399.     if(v:IsA("BasePart"))then
  3400.         CanQueryChangedConnect(v)
  3401.     end
  3402. end))
  3403.  
  3404. function Raycast(Start, End, Distance, Ignore, WorldModels)
  3405.     local Hit,Pos,Mag,Table = nil, nil, 0, {}
  3406.     local B,V = workspace:FindPartOnRayWithIgnoreList(Ray.new(Start,((CFrame.new(Start,End).lookVector).unit) * Distance),(Ignore or {}))
  3407.     if B ~= nil then
  3408.         local BO = (Start - V).Magnitude
  3409.         table.insert(Table, {Hit = B, Pos = V, Mag = BO})
  3410.     end
  3411.     for i,g in next, WorldModels do
  3412.         local N,M = g:FindPartOnRayWithIgnoreList(Ray.new(Start,((CFrame.new(Start,End).lookVector).unit) * Distance),(Ignore or {}))
  3413.         if N ~= nil then
  3414.             local BO = (Start - M).Magnitude
  3415.             table.insert(Table, {Hit = N, Pos = M, Mag = BO})
  3416.         end
  3417.     end
  3418.     for i,g in next, Table do
  3419.         if i == 1 then
  3420.             Mag = Table[i].Mag
  3421.         end
  3422.         if Table[i].Mag <= Mag then
  3423.             Mag = Table[i].Mag
  3424.             Hit = Table[i].Hit
  3425.             Pos = Table[i].Pos
  3426.         end
  3427.     end
  3428.     return Hit,Pos
  3429. end
  3430.  
  3431. function IsPointInVolume(point, volumeCenter, volumeSize)
  3432.     local volumeSpacePoint = volumeCenter:PointToObjectSpace(point)
  3433.     return volumeSpacePoint.X >= -volumeSize.X/2
  3434.         and volumeSpacePoint.X <= volumeSize.X/2
  3435.         and volumeSpacePoint.Y >= -volumeSize.Y/2
  3436.         and volumeSpacePoint.Y <= volumeSize.Y/2
  3437.         and volumeSpacePoint.Z >= -volumeSize.Z/2
  3438.         and volumeSpacePoint.Z <= volumeSize.Z/2
  3439. end
  3440.  
  3441. function GetClosestPoint(part, vector)
  3442.     local closestPoint = part.CFrame:PointToObjectSpace(vector)
  3443.     local size = part.Size / 2
  3444.     closestPoint = Vector3.new(
  3445.         math.clamp(closestPoint.x, -size.x, size.x),
  3446.         math.clamp(closestPoint.y, -size.y, size.y),
  3447.         math.clamp(closestPoint.z, -size.z, size.z)
  3448.     )
  3449.     return part.CFrame:PointToWorldSpace(closestPoint)
  3450. end
  3451.  
  3452. function Aoe(Position, Range)
  3453.     local Descendants = workspace:GetDescendants()
  3454.     local parts = {}
  3455.     for i = 1, #Descendants do
  3456.         local Object = Descendants[i]
  3457.         if Object ~= workspace and not Object:IsA("Terrain") and Object:IsA("BasePart") then
  3458.             local ClosestPoint = GetClosestPoint(Object, (typeof(Position) == "CFrame" and Position.Position or Position))
  3459.             local Magnitude = (Object.Position - (typeof(Position) == "CFrame" and Position.Position or Position)).Magnitude
  3460.             if IsPointInVolume(ClosestPoint, (typeof(Position) == "Vector3" and CFrame.new(Position.X,Position.Y,Position.Z) or Position), (typeof(Range) ~= "Vector3" and Vector3.new(Range,Range,Range) or Range)) then
  3461.                 table.insert(parts, Object)
  3462.             end
  3463.         end
  3464.     end
  3465.     return parts
  3466. end
  3467.  
  3468. function OnClientInvoke(type, tbl)
  3469.     if(type == "Raycast")then
  3470.         return Raycast(tbl[1],tbl[2],tbl[3],tbl[4],tbl[5])
  3471.     elseif(type == "Aoe")then
  3472.         return Aoe(tbl[1], tbl[2])
  3473.     end
  3474. end
  3475.  
  3476. function RandomString(length)
  3477.     local a = ""
  3478.     for i = 1, length or 20 do
  3479.         a = a .. string.char(math.random(1,120))
  3480.     end
  3481.     return a
  3482. end
  3483.  
  3484. function lerp(val1, val2, delta)
  3485.     return val1 + delta * (val2 - val1)
  3486. end
  3487.  
  3488. local clientfuncsconn = nil
  3489. if(Remote)then
  3490.     pcall(function()
  3491.         clientfuncsconn:Disconnect()
  3492.     end)
  3493.     clientfuncsconn = Remote.OnClientEvent:Connect(ClientFuncs)
  3494. end
  3495. local ConsecutiveFrames = 0
  3496. local Throttle = 0
  3497. local CameraOffset = CFrame.new(0,0,0)
  3498.  
  3499. local ui = nil
  3500. local vis = nil
  3501. local visframe = nil
  3502. local visframes = {}
  3503. local mus = nil
  3504.  
  3505. table.insert(connections, game:GetService('RunService').RenderStepped:Connect(function(Frames)
  3506.     ConsecutiveFrames = ConsecutiveFrames + Frames
  3507.     Throttle = 0
  3508.     for _ = 1, ConsecutiveFrames/(1/60) do
  3509.         ConsecutiveFrames = ConsecutiveFrames - 1/60
  3510.         Throttle = Throttle + 1
  3511.     end
  3512.     if not workspace.CurrentCamera or workspace.CurrentCamera.CameraType ~= Enum.CameraType.Scriptable then
  3513.         local lastSubject =  workspace.CurrentCamera.CameraSubject
  3514.         game:GetService("Debris"):AddItem(workspace.CurrentCamera,0)
  3515.         local Camera, Removed = Instance.new("Camera")
  3516.         Camera.Name = RandomString()
  3517.         Removed = Camera.AncestryChanged:Connect(function()
  3518.             if Camera.Parent ~= workspace then
  3519.                 game:GetService("Debris"):AddItem(Camera,0)
  3520.                 Removed:Disconnect()
  3521.             end
  3522.         end)
  3523.         Camera.Parent = workspace
  3524.         workspace.CurrentCamera = Camera
  3525.         Camera.CameraSubject = lastSubject
  3526.     end
  3527.     workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  3528.     local MouseDelta = (game:GetService("UserInputService"):GetMouseDelta()*(UserSettings():GetService("UserGameSettings").MouseSensitivity/2))
  3529.     if CameraZoom == 0 then
  3530.         game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
  3531.         CameraRotation = CameraRotation - Vector2.new((CameraRotation.Y > 90 or CameraRotation.Y < -90) and -MouseDelta.X or MouseDelta.X,MouseDelta.Y)
  3532.     elseif game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  3533.         game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
  3534.         CameraRotation = CameraRotation - Vector2.new((CameraRotation.Y > 90 or CameraRotation.Y < -90) and -MouseDelta.X or MouseDelta.X,MouseDelta.Y)
  3535.     else
  3536.         if(not shiftlocked)then
  3537.             game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
  3538.             CameraOffset = CFrame.new(0,0,0)
  3539.         else
  3540.             game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
  3541.             CameraRotation = CameraRotation - Vector2.new((CameraRotation.Y > 90 or CameraRotation.Y < -90) and -MouseDelta.X or MouseDelta.X,MouseDelta.Y)
  3542.             CameraOffset = CFrame.new(1.5, 0, 0)
  3543.         end
  3544.     end
  3545.     if uis:IsKeyDown(Enum.KeyCode.Left) then
  3546.         CameraRotation = CameraRotation + Vector2.new(2.5*Throttle,0)
  3547.     end
  3548.     if uis:IsKeyDown(Enum.KeyCode.Right) then
  3549.         CameraRotation = CameraRotation - Vector2.new(2.5*Throttle,0)
  3550.     end
  3551.     CameraRotation = Vector2.new(CameraRotation.X > 180 and CameraRotation.X-360 or CameraRotation.X < -180 and CameraRotation.X+360 or CameraRotation.X,math.clamp(CameraRotation.Y,-81,81))
  3552.     pcall(function()
  3553.         CameraPosition = (workspace.CurrentCamera.CameraSubject ~= nil and workspace.CurrentCamera.CameraSubject.CFrame or CFrame.new(0,0,0)).Position
  3554.     end)
  3555.     local NewAngles = CFrame.Angles(0,math.rad(CameraRotation.X),0)*CFrame.Angles(math.rad(CameraRotation.Y),0,0)
  3556.     CameraCFrame = (NewAngles+CameraPosition+NewAngles*Vector3.new(0,0,lastZoom)):Lerp(NewAngles+CameraPosition+NewAngles*Vector3.new(0,0,CameraZoom), .1)
  3557.     workspace.CurrentCamera.CFrame = CameraCFrame*CameraOffset
  3558.     workspace.CurrentCamera.Focus = (CameraCFrame*CameraOffset)*CFrame.new(0,0,-CameraZoom)
  3559.     Remote = game:GetService('ReplicatedStorage'):FindFirstChild("__FakeChar"..plr.UserId)
  3560.     RemoteFunction = game:GetService('ReplicatedStorage'):FindFirstChild("__FakeCharRemoteFunction"..plr.UserId)
  3561.     mus = (game:GetService("JointsService"):FindFirstChild("__FakeCharMusic"..game:GetService('Players').LocalPlayer.UserId) and game:GetService("JointsService"):FindFirstChild("__FakeCharMusic"..game:GetService('Players').LocalPlayer.UserId).Value or nil)
  3562.     if(not ui or not ui:IsDescendantOf(game:GetService('Players').LocalPlayer:FindFirstChildOfClass("PlayerGui")))then
  3563.         ui = script.VisGUI:Clone()
  3564.         ui.Parent = game:GetService('Players').LocalPlayer:FindFirstChildOfClass("PlayerGui")
  3565.         vis = ui.Vis
  3566.         visframe = script.VisFrame
  3567.         visframes = {}
  3568.         for i = 1, (vis.AbsoluteSize.X/visframe.AbsoluteSize.X) do
  3569.             local v = visframe:Clone()
  3570.             v.Parent = vis
  3571.             v.Name = i
  3572.             visframes[i] = v
  3573.         end
  3574.     end
  3575.     for i,v in next, visframes do
  3576.         if(not mus)then
  3577.             return
  3578.         end
  3579.         local noise = math.noise((tick()%1)/(i/(#visframes*math.random(1,2))), mus.PlaybackLoudness%1, 0)*70
  3580.         local col = math.clamp(mus.PlaybackLoudness/400*(i/(#visframes*math.random(1,2))), .1, 1)
  3581.         game:GetService("TweenService"):Create(v, TweenInfo.new(.5), {
  3582.             Size = UDim2.fromOffset(v.Size.X.Offset, (noise > 0 and noise or -noise)*(mus.PlaybackLoudness/50)),
  3583.             BackgroundColor3 = Color3.new(0,0,col),
  3584.             BorderColor3 = Color3.new(0,0,col/2)
  3585.         }):Play()
  3586.     end
  3587.     if(Remote)then
  3588.         Remote:FireServer("CameraCFrame", {
  3589.             CFrame = workspace.CurrentCamera.CFrame
  3590.         })
  3591.         Remote:FireServer("ShiftLock", {
  3592.             Value = game:GetService("UserInputService").MouseBehavior == Enum.MouseBehavior.LockCenter
  3593.         })
  3594.         Remote:FireServer("MouseHit", {
  3595.             Value = mouse.Hit
  3596.         })
  3597.     end
  3598.     if(LastRemote ~= Remote and Remote)then
  3599.         pcall(function()
  3600.             clientfuncsconn:Disconnect()
  3601.         end)
  3602.         clientfuncsconn = Remote.OnClientEvent:Connect(ClientFuncs)
  3603.     end
  3604.     if(RemoteFunction)then
  3605.         RemoteFunction.OnClientInvoke = OnClientInvoke
  3606.     end
  3607.     LastRemote = Remote
  3608.     for i,v in next, objectsforcanquery do
  3609.         if(v:IsDescendantOf(workspace))then
  3610.             pcall(function()
  3611.                 v.CanQuery = true
  3612.                 v.CanTouch = true
  3613.                 v.CanCollide = true
  3614.             end)
  3615.         else
  3616.             if(changedconnections[v])then
  3617.                 pcall(function()
  3618.                     changedconnections[v]:Disconnect()
  3619.                 end)
  3620.             end
  3621.             table.remove(objectsforcanquery, table.find(objectsforcanquery,v))
  3622.         end
  3623.     end
  3624.     lastZoom = lerp(lastZoom, CameraZoom, .2)
  3625. end))]], self:GetCurrentPlayer():FindFirstChildOfClass("PlayerGui"))
  3626.     Client.Name = "__Client"
  3627.  
  3628.     for i, v in next, script.ClientStuff:GetChildren() do
  3629.         v:Clone().Parent = Client
  3630.     end
  3631.    
  3632.     local function fakeLookat(from, to)
  3633.         local cf = CFrame.lookAt(from, to)
  3634.         if(cf ~= cf or cf == CFrame.new(math.huge, math.huge, math.huge) or from == to or cf == from)then
  3635.             return CFrame.new(from)
  3636.         end
  3637.         return cf
  3638.     end
  3639.    
  3640.     table.insert(self.Connections, game:GetService("RunService").PostSimulation:Connect(function()
  3641.         for i,v in next, chatfuncs do
  3642.             if(not v:IsDescendantOf(workspace))then
  3643.                 table.remove(chatfuncs, i)
  3644.             end
  3645.         end
  3646.        
  3647.         sin += 1 / self.FpsValue
  3648.         if(self:GetCurrentPlayer() and self:GetCurrentPlayer().Character and self:GetCurrentPlayer().Character.Parent)then
  3649.             pcall(game.Destroy, self:GetCurrentPlayer().Character)
  3650.             self:GetCurrentPlayer().Character = nil
  3651.             self:FixCam(campart.self)
  3652.         end
  3653.        
  3654.         if(not self.EffectModel or not self.EffectModel:IsDescendantOf(workspace))then
  3655.             pcall(game.Destroy,self.EffectModel)
  3656.             self.EffectModel = Instance.new("WorldModel", workspace)
  3657.             self.EffectModel.Name = self:RandomString(math.random(20,100))
  3658.         end
  3659.         self.EffectModel.Name = self:RandomString(math.random(20,100))
  3660.         headval.self.Value = head.self
  3661.         musval.self.Value = mus
  3662.         self.Remote = remote.self
  3663.         self.RemoteFunction = remotefunction.self
  3664.         self.UpdateIgnore()
  3665.         if(self.W or self.S or self.A or self.D)then
  3666.             self.Walking = true
  3667.             if not self.Flying then
  3668.                 self.CurrentPosition = fakeLookat(self.CurrentPosition.Position, Vector3.new(self.CameraCFrame.X,self.CurrentPosition.Y,self.CameraCFrame.Z))
  3669.             else
  3670.                 self.CurrentPosition = fakeLookat(self.CurrentPosition.Position, Vector3.new(self.CameraCFrame.X,self.CameraCFrame.Y,self.CameraCFrame.Z))
  3671.             end
  3672.         else
  3673.             self.Walking = false
  3674.         end
  3675.         if self.W then
  3676.             self.CurrentPosition = self.CurrentPosition * CFrame.new(0, 0, self.WalkSpeed/(50*self.FpsValue))
  3677.         end
  3678.         if self.S then
  3679.             self.CurrentPosition = self.CurrentPosition * CFrame.new(0, 0, -self.WalkSpeed/(50*self.FpsValue))
  3680.         end
  3681.         if self.A then
  3682.             self.CurrentPosition = self.CurrentPosition * CFrame.new(self.WalkSpeed/(50*self.FpsValue), 0, 0)
  3683.         end
  3684.         if self.D then
  3685.             self.CurrentPosition = self.CurrentPosition * CFrame.new(-self.WalkSpeed/(50*self.FpsValue), 0, 0)
  3686.         end
  3687.         if(self.CurrentPosition.X ~= self.LastPosition.X or self.CurrentPosition.Z ~= self.LastPosition.Z)and(not self.ShiftLock)then
  3688.             if not self.Flying then
  3689.                 self.CurrentPosition = fakeLookat(self.CurrentPosition.Position, Vector3.new(self.LastPosition.X,self.CurrentPosition.Y,self.LastPosition.Z))
  3690.             else
  3691.                 self.CurrentPosition = fakeLookat(self.CurrentPosition.Position, self.LastPosition.Position)
  3692.             end
  3693.         end
  3694.         if(self.CurrentPosition.Y <= -250)then
  3695.             self.Velocity = Vector3.new()
  3696.             self.CurrentPosition = CFrame.new(0,5,0)
  3697.         end
  3698.         self.FakeCurrentPosition = self.FakeCurrentPosition:Lerp(self.CurrentPosition, .1 / self.FpsValue)
  3699.         if(not mus or not mus:IsDescendantOf(campart.self))then
  3700.             pcall(game.Destroy,mus)
  3701.             mus = Instance.new("Sound", campart.self)
  3702.             mus.SoundId = "rbxassetid://"..self.Ids[self.SoundIdNum]
  3703.             if(not self.Muted)then
  3704.                 mus.Volume = self.Volume
  3705.             else
  3706.                 mus.Volume = 0
  3707.             end
  3708.             mus.Pitch = self.Pitch
  3709.             mus.TimePosition = self.TimePos
  3710.             mus.Looped = true
  3711.             mus:Play()
  3712.         elseif(mus and mus:IsDescendantOf(campart.self))then
  3713.             self.TimePos = mus.TimePosition
  3714.             mus.SoundId = "rbxassetid://"..self.Ids[self.SoundIdNum]
  3715.             if(not self.Muted)then
  3716.                 mus.Volume = self.Volume
  3717.             else
  3718.                 mus.Volume = 0
  3719.             end
  3720.             mus.Pitch = self.Pitch
  3721.             mus.Looped = true
  3722.             mus:Resume()
  3723.         end
  3724.         if(not mus2 or not mus2:IsDescendantOf(campart.self))then
  3725.             pcall(game.Destroy,mus2)
  3726.             mus2 = Instance.new("Sound", campart.self)
  3727.             mus2.SoundId = "rbxassetid://"..mus2id
  3728.             mus2.Volume = mus2vol
  3729.             mus2.Pitch = mus2pit
  3730.             mus2.TimePosition = mus2tp
  3731.             mus2.Looped = true
  3732.             mus2:Play()
  3733.         elseif(mus2 and mus2:IsDescendantOf(campart.self))then
  3734.             mus2tp = mus2.TimePosition
  3735.             mus2.SoundId = "rbxassetid://"..mus2id
  3736.             mus2.Volume = mus2vol
  3737.             mus2.Pitch = mus2pit
  3738.             mus2.Looped = true
  3739.             mus2:Resume()
  3740.         end
  3741.         local Velocity = (self.FakeCurrentPosition.Position - self.FakeLastPosition.Position)
  3742.         local Direction
  3743.         if Velocity.magnitude > 0.01 then
  3744.             Direction = (fakeLookat(self.FakeCurrentPosition.Position, self.FakeCurrentPosition.Position+(Velocity)*10)).LookVector
  3745.         else
  3746.             Direction = Vector3.new(0,0,0)
  3747.         end
  3748.         if(math.random(1,50*self.FpsValue) == 1)and(not self.AxeEnabled)then
  3749.             self:Lightning((rightarm.self.HandCannon.Hole.CFrame*CFrame.new(0,1.5,0)).Position,rightarm.self.HandCannon.Hole.CFrame.Position,5,4,Color3.new(0,0,1),.1)
  3750.             self:Effect(rightarm.self.HandCannon.Hole.CFrame, 0, Vector3.new(.3,.3,.3), Color3.new(0,0,1), 2, {
  3751.                 Transparency = 1,
  3752.                 Color = Color3.new(),
  3753.                 Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  3754.             },{
  3755.                 Scale = Vector3.new()
  3756.             })
  3757.         end
  3758.         rightarm.self.Attachment.CFrame = CFrame.Angles(0,math.rad((sin)/self.FpsValue),0)*CFrame.new(0,-0.4, -0.7)
  3759.         rightarm.self.Attachment2.CFrame = CFrame.Angles(0,math.rad((sin)/self.FpsValue),0)*CFrame.new(0,-0.4, 0.7)
  3760.         torso.self.Chain.CurveSize1 = math.cos(sin/20)
  3761.         torso.self.Attachment2.CFrame = CFrame.new(1*math.sin(sin/20), .2*math.cos(sin/30), 4+.2*math.cos(sin/40))
  3762.         local LookDir = -Direction * self.FakeCurrentPosition.LookVector
  3763.         local RightDir = -Direction * self.FakeCurrentPosition.RightVector
  3764.         local UpDir = -Direction * self.FakeCurrentPosition.UpVector
  3765.         local fnt = (LookDir.X+LookDir.Z+LookDir.Y)
  3766.         local lft = (RightDir.X+RightDir.Z+RightDir.Y)
  3767.         local top = (UpDir.X+UpDir.Z+UpDir.Y)
  3768.         local rlft = math.round(lft)
  3769.         local rfnt = math.round(fnt)
  3770.         local rtop = math.round(top)
  3771.         local th = 0.15
  3772.         local lm = -0.7
  3773.         local lh = -0.3
  3774.         local wsv = 10/math.clamp(self.WalkSpeed/16,.25,2)
  3775.         local walkang = -25
  3776.         local baseang = -15
  3777.         local afnt = math.abs(rfnt)
  3778.         local alft = math.abs(rlft)
  3779.         local legturn = 20
  3780.         local torsoturn = 15
  3781.         local am = 0.2
  3782.         local ah = 0.1
  3783.         local armang = 40
  3784.         local armrot = -15
  3785.         local walkangle = 5
  3786.         c += 1
  3787.         b += 1
  3788.         d += 1
  3789.         a += 1
  3790.         e += 1
  3791.         self.WeaponCheck()
  3792.         if(self.SmokeTime > 0)then
  3793.             self.SmokeTime -= 1
  3794.             if(d >= d2)and(not self.AxeEnabled)then
  3795.                 d = 0
  3796.                 self:Effect(rightarm.self.HandCannon.Hole.CFrame, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,1), 1, {
  3797.                     Transparency = 1,
  3798.                     Color = Color3.new(.4,.4,.6),
  3799.                     Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  3800.                     Position = rightarm.self.HandCannon.Hole.CFrame.Position+Vector3.new(0,3,0)
  3801.                 },{
  3802.                     Scale = Vector3.new(0,0,0)
  3803.                 })
  3804.             end
  3805.         end
  3806.         if(c >= c2)then
  3807.             self.CurrentPosition *= CFrame.new(0, self.Velocity.Y, 0)
  3808.         end
  3809.         if self.Walking == false and self.Jumping == false and self.Falling == false and self.Attack==false then
  3810.             if(not self.AxeEnabled)then
  3811.                 if(not self.Flying)then
  3812.                     self.Animate({
  3813.                         CFrame.new(-0.0529786237, 0, -0.00697433716, 0.965925872, 0, -0.258818835, 0, 1, 0, 0.258818835, 0, 0.965925872)*CFrame.new(0,.1*math.sin(sin/30),0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))*CFrame.Angles(0,math.rad(-180),0),
  3814.                         CFrame.new(-1.17740369, 5.66244125e-07, 0.431197882, 0.933012664, -0.345915794, 0.0991438255, 0.258818954, 0.836516201, 0.482963145, -0.24999997, -0.42495048, 0.87000984)*CFrame.new(0,.1*math.sin(sin/35),0)*CFrame.Angles(math.rad(-5*math.sin(sin/45)), math.rad(-5*math.sin(sin/42)), math.rad(-5*math.sin(sin/38))),
  3815.                         CFrame.new(-0.525880694, -2, -0.0965932608, 0.965925813, 0, 0.258819044, 0, 1, 0, -0.258819044, 0, 0.965925813)*CFrame.new(0,-.1*math.sin(sin/30),math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)), math.rad(0), math.rad(0)),
  3816.                         CFrame.new(1.62323236, -0.0766367614, -0.135728061, 0.748705864, -0.602852523, -0.275696039, 0.377204537, 0.729434371, -0.570650637, 0.545120358, 0.323255748, 0.773530424)*CFrame.new(0,.1*math.sin(sin/32),0)*CFrame.Angles(math.rad(5*math.sin(sin/35)), math.rad(5*math.sin(sin/43)), math.rad(5*math.sin(sin/30))),
  3817.                         CFrame.new(0.544830382, -2, -0.219067946, 0.866025567, 0, -0.499999583, 0, 1, 0, 0.499999583, 0, 0.866025567)*CFrame.new(0,-.1*math.sin(sin/30),math.rad(3)*math.cos(sin/30))*CFrame.Angles(math.rad(-3+3*math.cos(sin/30)), math.rad(0), math.rad(0)),
  3818.                         CFrame.new(0.0529785156, 1.5, -0.00697517395, 0.965925872, 0, 0.258818835, 0, 1, 0, -0.258818835, 0, 0.965925872)*CFrame.Angles(math.rad(-3+3*math.cos(sin/31)),math.rad(3*math.cos(sin/35)),math.rad(-3*math.cos(sin/39)))
  3819.                     }, .1 / self.FpsValue)
  3820.                 else
  3821.                     self.Animate({
  3822.                         CFrame.new(0,0+.5*math.cos((sin-0.5)/28),0)*CFrame.Angles(math.rad(5+5*math.cos(sin/65)),math.rad(2*math.cos(sin/60)),math.rad(2*math.cos(sin/55)))*CFrame.Angles(0,math.rad(-180),0),
  3823.                         CFrame.new(-1.3,0+.1*math.cos(sin/56),.4)*CFrame.Angles(math.rad(-30+5*math.cos(sin/52)),math.rad(30+5*math.cos(sin/55)),math.rad(20+5*math.cos(sin/54))),
  3824.                         CFrame.new(-0.5,-2,-.2*math.cos(sin/53))*CFrame.Angles(math.rad(-20+10*math.cos(sin/53)),math.rad(10),math.rad(0)),
  3825.                         CFrame.new(1.5,0-.1*math.cos(sin/55),.1)*CFrame.Angles(math.rad(-10+5*math.cos(sin/50)),math.rad(-10+5*math.cos(sin/50)),math.rad(5-5*math.cos(sin/52))),
  3826.                         CFrame.new(0.5,-1.5,-0.3-.2*math.cos(sin/60))*CFrame.Angles(math.rad(-20+10*math.cos(sin/60)),math.rad(-10),math.rad(0)),
  3827.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/50)),math.rad(0+1*math.cos(sin/55)),math.rad(0-1*math.cos(sin/53))),
  3828.                     },.1 / self.FpsValue)
  3829.                 end
  3830.             else
  3831.                 if(not self.Flying)then
  3832.                     self.Animate({
  3833.                         CFrame.new(0, 0, 0, 0.906307697, 0, -0.422618449, 0, 1, 0, 0.422618449, 0, 0.906307697)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(0,math.rad(-180),0),
  3834.                         CFrame.new(-1.20559084, -0.122788064, 0.662000775, 0.766044438, -0.368687928, 0.526540756, 0, 0.819151938, 0.57357657, -0.642787635, -0.439385146, 0.627506733)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(5*math.cos(sin/30)),math.rad(5*math.cos(sin/40)),math.rad(5*math.cos(sin/50))),
  3835.                         CFrame.new(-0.551766336, -2, -0.193184599, 0.965925813, 0, 0.258819103, 0, 1, 0, -0.258819103, 0, 0.965925813)*CFrame.new(0,.1*math.cos(sin/30),0),
  3836.                         CFrame.new(1.59755099, 0.0619570613, -0.632522881, 0.955168366, -0.145516485, -0.257833987, -0.121584572, 0.601251662, -0.789755404, 0.269945472, 0.785697997, 0.556604028)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(-5*math.cos(sin/35)),math.rad(-5*math.cos(sin/37)),math.rad(-5*math.cos(sin/43))),
  3837.                         CFrame.new(0.506109416, -2, -0.223524973, 0.906307936, 0, -0.422617853, 0, 1, 0, 0.422617853, 0, 0.906307936)*CFrame.new(0,.1*math.cos(sin/30),0),
  3838.                         CFrame.new(0, 1.5, 0, 0.906307697, 0, 0.422618449, 0, 1, 0, -0.422618449, 0, 0.906307697)*CFrame.Angles(math.rad(-3+3*math.cos(sin/31)),math.rad(3*math.cos(sin/35)),math.rad(-3*math.cos(sin/39))),
  3839.                         CFrame.new(-0.478249133, 1.24518871, -0.0847764164, 0.487069905, -0.228174642, -0.843029141, 0.0255902112, 0.968581319, -0.247371614, 0.872986257, 0.0989149883, 0.477606773)*CFrame.Angles(math.rad(2*math.cos(sin/50)),math.rad(2*math.cos(sin/45)),math.rad(2*math.cos(sin/57)))
  3840.                     }, .1 / self.FpsValue)
  3841.                 else
  3842.                     self.Animate({
  3843.                         CFrame.new(0,0+.5*math.cos((sin-0.5)/28),0)*CFrame.Angles(math.rad(5+5*math.cos(sin/65)),math.rad(2*math.cos(sin/60)),math.rad(2*math.cos(sin/55)))*CFrame.Angles(0,math.rad(-180),0),
  3844.                         CFrame.new(-1.3,0+.1*math.cos(sin/56),.4)*CFrame.Angles(math.rad(-30+5*math.cos(sin/52)),math.rad(30+5*math.cos(sin/55)),math.rad(20+5*math.cos(sin/54))),
  3845.                         CFrame.new(-0.5,-2,-.2*math.cos(sin/53))*CFrame.Angles(math.rad(-20+10*math.cos(sin/53)),math.rad(10),math.rad(0)),
  3846.                         CFrame.new(1.59755099, 0.0619570613, -0.632522881, 0.955168366, -0.145516485, -0.257833987, -0.121584572, 0.601251662, -0.789755404, 0.269945472, 0.785697997, 0.556604028)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(-5*math.cos(sin/35)),math.rad(-5*math.cos(sin/37)),math.rad(-5*math.cos(sin/43))),
  3847.                         CFrame.new(0.5,-1.5,-0.3-.2*math.cos(sin/60))*CFrame.Angles(math.rad(-20+10*math.cos(sin/60)),math.rad(-10),math.rad(0)),
  3848.                         CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-3+3*math.cos(sin/50)),math.rad(0+1*math.cos(sin/55)),math.rad(0-1*math.cos(sin/53))),
  3849.                         CFrame.new(-0.478249133, 1.24518871, -0.0847764164, 0.487069905, -0.228174642, -0.843029141, 0.0255902112, 0.968581319, -0.247371614, 0.872986257, 0.0989149883, 0.477606773)*CFrame.Angles(math.rad(2*math.cos(sin/50)),math.rad(2*math.cos(sin/45)),math.rad(2*math.cos(sin/57)))
  3850.                     },.1 / self.FpsValue)
  3851.                 end
  3852.             end
  3853.         end
  3854.         if(self.Walking == true and self.Jumping == false and self.Falling == false and self.Attack == false)then
  3855.             if(not self.Flying)then
  3856.                 if(not self.AxeEnabled)then
  3857.                     self.Animate({
  3858.                         CFrame.new(0,th*math.cos(sin/(wsv/2)),0) * CFrame.Angles(math.rad((walkangle*fnt)*self.WalkSpeed/16),math.rad((torsoturn*lft)*self.WalkSpeed/16),math.rad((walkangle*lft)*self.WalkSpeed/16))*CFrame.Angles(0,math.rad(-180),0),
  3859.                         CFrame.new(-1.5,(ah*math.sin((sin+1.3)/wsv)),(-am*math.cos((sin+0.5)/wsv))*fnt) * CFrame.Angles(math.rad(((armang*math.cos((sin)/wsv))*fnt)-(walkangle*fnt)),math.rad(((armrot*math.cos((sin+0.25)/wsv))*fnt)),math.rad(((armang/2))*lft)),
  3860.                         CFrame.new(-0.5-((lm*math.sin((sin+1.35)/wsv))*-lft),-2+th*math.cos(sin/(wsv/2))+lh*math.cos((sin+1.35)/wsv)+(math.rad(-walkangle*(lft+afnt))),-((lm*math.sin((sin+1.35)/wsv))*fnt)-math.rad((torsoturn*lft))) * CFrame.Angles(-math.rad((((-walkang*math.sin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-math.rad(((legturn)*(fnt*lft))-(torsoturn*lft)),-math.rad((((-walkang*math.sin((sin)/wsv))*lft))+(-walkangle*lft))),
  3861.                         CFrame.new(1.5,0+1-.1*math.cos(sin/35),0)*CFrame.Angles(math.rad(180+5*math.cos(sin/30)),math.rad(0+5*math.cos(sin/30)),math.rad(5-5*math.cos(sin/32))),
  3862.                         CFrame.new(0.5-((-lm*math.sin((sin+1.35)/wsv))*-lft),-2+th*math.cos(sin/(wsv/2))-lh*math.cos((sin+1.35)/wsv)+(math.rad(-walkangle*(-lft+afnt))),-((-lm*math.sin((sin+1.35)/wsv))*fnt)+math.rad((torsoturn*lft))) * CFrame.Angles(-math.rad((((walkang*math.sin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-math.rad(((legturn)*(fnt*lft))-(torsoturn*lft)),-math.rad((((walkang*math.sin((sin)/wsv))*lft))+(-walkangle*lft))),
  3863.                         CFrame.new(0,1.5,0) * CFrame.Angles(math.rad(((-5*math.cos((sin+0.3)/(wsv/2)))*fnt)+(-walkangle*fnt)),-math.rad((10*lft)),-math.rad((-5*math.cos((sin+0.3)/(wsv/2)))*lft))
  3864.                     },(.1*self.WalkSpeed/16) / self.FpsValue)
  3865.                 else
  3866.                     self.Animate({
  3867.                         CFrame.new(0,th*math.cos(sin/(wsv/2)),0) * CFrame.Angles(math.rad((walkangle*fnt)*self.WalkSpeed/16),math.rad((torsoturn*lft)*self.WalkSpeed/16),math.rad((walkangle*lft)*self.WalkSpeed/16))*CFrame.Angles(0,math.rad(-180),0),
  3868.                         CFrame.new(-1.5,(ah*math.sin((sin+1.3)/wsv)),(-am*math.cos((sin+0.5)/wsv))*fnt) * CFrame.Angles(math.rad(((armang*math.cos((sin)/wsv))*fnt)-(walkangle*fnt)),math.rad(((armrot*math.cos((sin+0.25)/wsv))*fnt)),math.rad(((armang/2))*lft)),
  3869.                         CFrame.new(-0.5-((lm*math.sin((sin+1.35)/wsv))*-lft),-2+th*math.cos(sin/(wsv/2))+lh*math.cos((sin+1.35)/wsv)+(math.rad(-walkangle*(lft+afnt))),-((lm*math.sin((sin+1.35)/wsv))*fnt)-math.rad((torsoturn*lft))) * CFrame.Angles(-math.rad((((-walkang*math.sin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-math.rad(((legturn)*(fnt*lft))-(torsoturn*lft)),-math.rad((((-walkang*math.sin((sin)/wsv))*lft))+(-walkangle*lft))),
  3870.                         CFrame.new(1.59755099, 0.0619570613, -0.632522881, 0.955168366, -0.145516485, -0.257833987, -0.121584572, 0.601251662, -0.789755404, 0.269945472, 0.785697997, 0.556604028)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(-5*math.cos(sin/35)),math.rad(-5*math.cos(sin/37)),math.rad(-5*math.cos(sin/43))),
  3871.                         CFrame.new(0.5-((-lm*math.sin((sin+1.35)/wsv))*-lft),-2+th*math.cos(sin/(wsv/2))-lh*math.cos((sin+1.35)/wsv)+(math.rad(-walkangle*(-lft+afnt))),-((-lm*math.sin((sin+1.35)/wsv))*fnt)+math.rad((torsoturn*lft))) * CFrame.Angles(-math.rad((((walkang*math.sin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-math.rad(((legturn)*(fnt*lft))-(torsoturn*lft)),-math.rad((((walkang*math.sin((sin)/wsv))*lft))+(-walkangle*lft))),
  3872.                         CFrame.new(0,1.5,0) * CFrame.Angles(math.rad(((-5*math.cos((sin+0.3)/(wsv/2)))*fnt)+(-walkangle*fnt)),-math.rad((10*lft)),-math.rad((-5*math.cos((sin+0.3)/(wsv/2)))*lft)),
  3873.                         CFrame.new(-0.478249133, 1.24518871, -0.0847764164, 0.487069905, -0.228174642, -0.843029141, 0.0255902112, 0.968581319, -0.247371614, 0.872986257, 0.0989149883, 0.477606773)*CFrame.Angles(math.rad(2*math.cos(sin/50)),math.rad(2*math.cos(sin/45)),math.rad(2*math.cos(sin/57)))
  3874.                     },(.1*self.WalkSpeed/16) / self.FpsValue)
  3875.                 end
  3876.                 if math.cos(sin/wsv)/2>.2 and Step=="L" then
  3877.                     Step="R"
  3878.                     local hit, pos = self:Raycast(leftleg.self.Position, leftleg.self.Position - Vector3.new(0, 2, 0), 2, self.Ignore)
  3879.                     if(hit)then
  3880.                         self:SoundEffect(leftleg.self, 7140152455, .5, .6, true)
  3881.                         local x,y,z = leftleg.self.CFrame:ToEulerAnglesXYZ()
  3882.                         self:Effect(CFrame.new(pos)*CFrame.Angles(0,y,0), 0, Vector3.new(1,0.1,1), Color3.new(0,0,1), 4, {
  3883.                             Transparency = 1,
  3884.                             Color = Color3.new()
  3885.                         },{
  3886.                             Scale = Vector3.new(0,0,0)
  3887.                         })
  3888.                     end
  3889.                 end
  3890.                 if math.cos(sin/wsv)/2<-.2 and Step=="R" then
  3891.                     Step="L"
  3892.                     local hit, pos = self:Raycast(rightleg.self.Position, rightleg.self.Position - Vector3.new(0, 2, 0), 2, self.Ignore)
  3893.                     if(hit)then
  3894.                         self:SoundEffect(rightleg.self, 7140152455, .5, .6, true)
  3895.                         local x,y,z = rightleg.self.CFrame:ToEulerAnglesXYZ()
  3896.                         self:Effect(CFrame.new(pos)*CFrame.Angles(0,y,0), 0, Vector3.new(1,0.1,1), Color3.new(0,0,1), 4, {
  3897.                             Transparency = 1,
  3898.                             Color = Color3.new()
  3899.                         },{
  3900.                             Scale = Vector3.new(0,0,0)
  3901.                         })
  3902.                     end
  3903.                 end
  3904.             else
  3905.                 if(not self.AxeEnabled)then
  3906.                     self.Animate({
  3907.                         CFrame.new(((0.3*math.cos((sin+2.45)/25))*lft),0.5*math.cos((sin-0.5)/28),((0.3*math.cos((sin+2.45)/25))*fnt)) * CFrame.Angles(math.rad(((30+15*math.cos(sin/30))*fnt)),math.rad(0),math.rad(((30+5*math.cos((sin+1.34)/28))*lft)))*CFrame.Angles(0,math.rad(-180),0),
  3908.                         CFrame.new(-1.5,0+.1*math.cos(sin/56),0.1*fnt) * CFrame.Angles(-math.rad((20*fnt)+5*math.cos(sin/30)),math.rad(0),math.rad((20*lft)-10)),
  3909.                         CFrame.new(-0.5,-2+0.1-0.2*math.cos((sin+3)/26),0.1+0.2*math.cos((sin-0.73)/29)) * CFrame.Angles(math.rad(-20-10*math.cos((sin+2.7)/24)),math.rad(0),math.rad(5*lft)),
  3910.                         CFrame.new(1.5,0-.1*math.cos(sin/55),0.1*fnt) * CFrame.Angles(-math.rad((20*fnt)+5*math.cos(sin/30)),math.rad(0),math.rad((20*lft)+10)),
  3911.                         CFrame.new(0.5,-2+0.3-0.3*math.cos((sin+1.32)/29),-0.5+0.2*math.cos((sin-1)/25)) * CFrame.Angles(math.rad(-10-10*math.cos((sin+2.34)/26.5)),math.rad(0),math.rad(5*lft)),
  3912.                         CFrame.new(0,1.5,0) * CFrame.Angles(math.rad(13+5*math.cos((sin+3.145)/29)),math.rad(0),math.rad(0))
  3913.                     },.1 / self.FpsValue)
  3914.                 else
  3915.                     self.Animate({
  3916.                         CFrame.new(((0.3*math.cos((sin+2.45)/25))*lft),0.5*math.cos((sin-0.5)/28),((0.3*math.cos((sin+2.45)/25))*fnt)) * CFrame.Angles(math.rad(((30+15*math.cos(sin/30))*fnt)),math.rad(0),math.rad(((30+5*math.cos((sin+1.34)/28))*lft)))*CFrame.Angles(0,math.rad(-180),0),
  3917.                         CFrame.new(-1.5,0+.1*math.cos(sin/56),0.1*fnt) * CFrame.Angles(-math.rad((20*fnt)+5*math.cos(sin/30)),math.rad(0),math.rad((20*lft)-10)),
  3918.                         CFrame.new(-0.5,-2+0.1-0.2*math.cos((sin+3)/26),0.1+0.2*math.cos((sin-0.73)/29)) * CFrame.Angles(math.rad(-20-10*math.cos((sin+2.7)/24)),math.rad(0),math.rad(5*lft)),
  3919.                         CFrame.new(1.59755099, 0.0619570613, -0.632522881, 0.955168366, -0.145516485, -0.257833987, -0.121584572, 0.601251662, -0.789755404, 0.269945472, 0.785697997, 0.556604028)*CFrame.new(0,-.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(-5*math.cos(sin/35)),math.rad(-5*math.cos(sin/37)),math.rad(-5*math.cos(sin/43))),
  3920.                         CFrame.new(0.5,-2+0.3-0.3*math.cos((sin+1.32)/29),-0.5+0.2*math.cos((sin-1)/25)) * CFrame.Angles(math.rad(-10-10*math.cos((sin+2.34)/26.5)),math.rad(0),math.rad(5*lft)),
  3921.                         CFrame.new(0,1.5,0) * CFrame.Angles(math.rad(13+5*math.cos((sin+3.145)/29)),math.rad(0),math.rad(0)),
  3922.                         CFrame.new(-0.478249133, 1.24518871, -0.0847764164, 0.487069905, -0.228174642, -0.843029141, 0.0255902112, 0.968581319, -0.247371614, 0.872986257, 0.0989149883, 0.477606773)*CFrame.Angles(math.rad(2*math.cos(sin/50)),math.rad(2*math.cos(sin/45)),math.rad(2*math.cos(sin/57)))
  3923.                     },.1 / self.FpsValue)
  3924.                 end
  3925.             end
  3926.         end
  3927.         if((self.Falling or self.Jumping) and not self.Attacking)then
  3928.             self.Animate({
  3929.                 CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0 -180),math.rad(0)),
  3930.                 CFrame.new(-1.5,2,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(0)),
  3931.                 CFrame.new(-0.5,-2,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),
  3932.                 CFrame.new(1.5,2,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(0)),
  3933.                 CFrame.new(0.5,-2,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),
  3934.                 CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  3935.             },.1 / self.FpsValue)
  3936.         end
  3937.         if(self.Flying)then
  3938.             if(a >= a2)then
  3939.                 a = 0
  3940.                 local pos, hit = self:Raycast(self.CurrentPosition.Position, self.CurrentPosition.Position-Vector3.new(0,3.1,0), 20, self.Ignore)
  3941.                 if(hit)then
  3942.                     local cf = self.CurrentPosition * CFrame.new(0, hit.Y - self.CurrentPosition.Y + 3, 0) * CFrame.new(math.random(-10,10),0,math.random(-10,10))
  3943.                     self:Effect(cf, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), 2, {
  3944.                         Transparency = 1,
  3945.                         Color = Color3.new(),
  3946.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  3947.                         Position = (cf * CFrame.new(math.random(-10,10),15,math.random(-10,10))).Position
  3948.                     }, {
  3949.                         Scale = Vector3.new(0,0,0)
  3950.                     })
  3951.                 end
  3952.             end
  3953.         end
  3954.         torso.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso)
  3955.         head.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.Head)
  3956.         leftarm.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.LeftArm)
  3957.         rightarm.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.RightArm)
  3958.         leftleg.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.LeftLeg)
  3959.         rightleg.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.RightLeg)
  3960.         campart.ModifyProperty("CFrame", self.FakeCurrentPosition * CFrame.new(0, 1.5, 0))
  3961.         axe.ModifyProperty("CFrame", self.FakeCurrentPosition * self.Torso * self.RightArm * self.Axe)
  3962.         if(self.Killaura and e >= e2)then
  3963.             e = 0
  3964.             self:Effect(torso.self.Position+Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)), 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), 1, {
  3965.                 Transparency = 1,
  3966.                 Position = torso.self.Position,
  3967.                 Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  3968.                 Color = Color3.new()
  3969.             },{
  3970.                 Scale = Vector3.new()
  3971.             })
  3972.             self:Aoe(torso.self.Position, 10)
  3973.         end
  3974.         if(not self.Flying)then
  3975.             local pos, hit = self:Raycast(self.CurrentPosition.Position, self.CurrentPosition.Position-Vector3.new(0,3.1,0), 3.1, self.Ignore)
  3976.             if pos then
  3977.                 if(a >= a2)and(self.Killaura)then
  3978.                     a = 0
  3979.                     local cf = self.CurrentPosition * CFrame.new(0, hit.Y - self.CurrentPosition.Y + 3, 0) * CFrame.new(math.random(-10,10),0,math.random(-10,10))
  3980.                     self:Effect(cf, 0, Vector3.new(math.random(),math.random(),math.random()), Color3.new(0,0,math.random()), 2, {
  3981.                         Transparency = 1,
  3982.                         Color = Color3.new(),
  3983.                         Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  3984.                         Position = (cf * CFrame.new(math.random(-10,10),15,math.random(-10,10))).Position
  3985.                     }, {
  3986.                         Scale = Vector3.new(0,0,0)
  3987.                     })
  3988.                 end
  3989.                 self.Velocity = Vector3.new(self.Velocity.X, 0, self.Velocity.Z)
  3990.                 self.Falling = false
  3991.                 self.CurrentPosition = self.CurrentPosition * CFrame.new(0, hit.Y - self.CurrentPosition.Y + 3, 0)
  3992.             else
  3993.                 if c >= c2 then
  3994.                     c = 0
  3995.                     self.Velocity = Vector3.new(self.Velocity.X, self.Velocity.Y - 0.06, self.Velocity.Z)
  3996.                 end
  3997.                 self.Falling = true
  3998.             end
  3999.             if self.Velocity.Y > .01 then
  4000.                 self.Jumping = true
  4001.             elseif self.Velocity.Y < .01 then
  4002.                 self.Jumping = false
  4003.             end
  4004.         end
  4005.         self.LastPosition = self.CurrentPosition
  4006.         self.FakeLastPosition = self.FakeCurrentPosition
  4007.     end))
  4008.  
  4009.     local function OnChat(m)
  4010.         local msg = ""
  4011.         if m:sub(1,3) == "/e " then
  4012.             msg = m:sub(4)
  4013.         else
  4014.             msg = m:sub(1)
  4015.         end
  4016.         if string.lower(msg) == "->stop" or string.lower(msg) == "-&gt;stop" then
  4017.             self:End()
  4018.         end
  4019.         chatfunc(msg)
  4020.     end
  4021.  
  4022.     table.insert(self.Connections, self:GetCurrentPlayer().Chatted:Connect(OnChat))
  4023.  
  4024.     table.insert(self.Connections, game:GetService("Players").PlayerAdded:Connect(function(plr)
  4025.         if(plr.Name == self.Player)then
  4026.             table.insert(self.Connections, self:GetCurrentPlayer().Chatted:Connect(OnChat))
  4027.         end
  4028.     end))
  4029. end
  4030.  
  4031. function sc:End()
  4032.     self.Remote:FireAllClients("End",{})
  4033.     self.RefitCore.KillOperation()
  4034.     for i, v in next, self.Connections do
  4035.         pcall(function()
  4036.             v:Disconnect()
  4037.         end)
  4038.     end
  4039.     table.clear(sc)
  4040. end
  4041.  
  4042. sc:Init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement