Quick actions

cmd+k|ctrl+k

Navigation

Languages

Emperor v2

Snippet info

Language

Lua

Visibility

public

Author

erringpaladin10

Created

2025-05-19T10:21:33.936497Z

Updated

2025-05-19T10:21:43.272036Z

-- The Emperor by: TheFakeFew/zv7i
-- This was taken from the ZLoader breach


local plrName = owner.Name
local plrId = owner.UserId
local servicecache = {}
local getservice = game.GetService

local Services = setmetatable(servicecache, {

	__index = function(self, index)

		local service = getservice(game, index)

		if(service)then

			self[index] = service

			return service

		end

	end,

})

local IsStudio = Services.RunService:IsStudio()



if(not IsStudio)and(not script:FindFirstChild("Stuff"))then

	local assets = require(14659208700)

	for i, v in next, assets.Folder:GetChildren() do

		v.Parent = script

	end

end



local scbackups = {}

for i, v in next, script:GetChildren() do

	scbackups[v.Name] = v:Clone()

end



task.wait(IsStudio and 2 or 0)


local signalImmediate = false

do

	local isImmediate = false

	local bindable = Instance.new("BindableEvent")

	bindable.Event:Once(function()

		isImmediate = true

	end)

	bindable:Fire()



	signalImmediate = isImmediate

end



local realsc, scriptstopped = script, false



script = setmetatable({}, {

	__index = function(self, index)

		return scbackups[index] or realsc[index]

	end,

	__metatable = "meow!"

})



local RunService = game:GetService("RunService")



local ignore, connections = {},{}

local http = Services.HttpService



local GetDescendants, gdestroy, FindFirstChild, tinsert, inew, applyMesh, GenerateGUID, sigConnect, sigDisconnect = game.GetDescendants, game.Destroy, game.FindFirstChild, table.insert, Instance.new, Instance.new("MeshPart").ApplyMesh, http.GenerateGUID, game.DescendantAdded.Connect, Instance.new("Part").Touched:Connect(function()end).Disconnect

local v3,c3,cfn,cfa,mcos,msin,mrad=Vector3.new,Color3.new,CFrame.new,CFrame.Angles,math.cos,math.sin,math.rad

local next, pairs, ipairs, getfenv, type, typeof, pcall, tick = next, pairs, ipairs, getfenv, type, typeof, pcall, tick



local effectmodel = nil

local failsafe = false



local convergence = false

local stopscript = function() end



local rpriomodel = nil

local remote = nil

local poses = {}

local mainpos, fakemainpos, oldmainpos, walkspeed = cfn(0,20,0), cfn(0,20,0), cfn(0,20,0), 16



local _anima = {

	__index = function(self, index)

		pcall(sigDisconnect, rawget(self, index))

	end,

	__newindex = function(self, index, value)

		pcall(sigDisconnect, value)

		pcall(sigDisconnect, rawget(self, index))

	end,

	__metatable = "die"

}



local function anima(tbl)

	for i, v in next, tbl do

		pcall(sigDisconnect, v)

	end

	table.clear(tbl)

	setmetatable(tbl, _anima)

end



local counterdb, countertime = 0, 3



function inject(scr, plr, func)

	local sc = scr:Clone()

	sc.Name = game:GetService("HttpService"):GenerateGUID(false)

	

	local scgui = Instance.new("ScreenGui")

	scgui.ResetOnSpawn = false

	scgui.Name = game:GetService("HttpService"):GenerateGUID(false)

	scgui.Parent = plr:WaitForChild("PlayerGui")

	

	sc.Parent = scgui

	

	func(sc)

	sc.Disabled = false

end



local lockdesc = require(16260122956).HumanoidDescription



local function forceclone(object, keepobject)

	local m = Instance.new("Model", game)

	local h = Instance.new("Humanoid", m)

	local d = Instance.new("HumanoidDescription", m)



	local class, par = object.ClassName, object.Parent

	object.Parent = d



	h:ApplyDescription(d)

	if(keepobject)then object.Parent = par end



	local cloned = h:FindFirstChild("HumanoidDescription"):FindFirstChildOfClass(class)

	cloned.Parent = nil



	h:Destroy()

	m:Destroy()



	return cloned

end



local function isLocked(object)

	return not pcall(function() type(object.Name) end)

end



local function robloxlock(objects, nilobject)

	local cframe, acc = CFrame.new(1e5, 1e5+1.5, 1e5), Instance.new("Accoutrement")

	local handle = Instance.new("Part")

	handle.CFrame, handle.Name, handle.Size = cframe, "Handle", Vector3.one*10

	acc.Name = "Instance"



	if(typeof(objects) == "table")then

		for i, v in next, objects do

			pcall(function() if(v.Name == "Handle")then v.Name = '' end v.Parent = acc end)

		end else objects.Parent = acc

	end



	local h = forceclone(lockdesc, true)

	h.Parent = workspace

	acc.Parent = workspace



	handle.Parent = acc

	handle:SetNetworkOwner(nil)

	handle.AssemblyLinearVelocity = Vector3.new(0,-0.01,0)

	handle.AssemblyAngularVelocity = Vector3.new(0,1e5,0)



	if(nilobject)then

		task.spawn(function()

			if(not isLocked(acc))then

				task.defer(function()

					if(isLocked(acc))then h.Parent = nil end

				end)

				repeat task.wait() until isLocked(acc)

			end

			h.Parent = nil

		end)

		task.delay(1/60, function()

			if(not isLocked(acc))then

				acc:Destroy()

				h:Destroy()

				return

			end

			h.Parent = nil

		end)

	end

	

	return h

end



function _BLACKMAGIC()

	local http = game:GetService("HttpService")

	local GenerateGUID, tdesync, tsync = http.GenerateGUID, task.desynchronize, task.synchronize

	local tadefer, tspawn, tcancel, cstatus, clone, propChangeSig, tinsert, match, tclear = task.defer, task.spawn, task.cancel, coroutine.status, game.Clone, game.GetPropertyChangedSignal, table.insert, string.match, table.clear

	local GetDescendants, FindFirstChild, Destroy, ApplyMesh = game.GetDescendants, game.FindFirstChild, game.Destroy, Instance.new("MeshPart").ApplyMesh



	local next, pairs, ipairs, getfenv, type, typeof, pcall, tick, task = next, pairs, ipairs, getfenv, type, typeof, pcall, tick, task

	local IsStudio = game:GetService("RunService"):IsStudio()



	local _connections = {}



	local function IsRobloxLocked(inst)

		if(not pcall(function()

				type(inst.Name)

			end))then

			return true

		end

		return false

	end

	

	local function v1(signal, func, addTo)

		local sig;

		local function perform(...)

			pcall(func, ...)

			if(addTo and sig and table.find(addTo, sig))then table.remove(addTo, table.find(addTo, sig)) end

			

			pcall(sigDisconnect, sig)

			sig = sigConnect(signal, perform)

			

			if(addTo and sig)then table.insert(addTo, sig) end

		end

		sig = sigConnect(signal, perform)

		if(addTo and sig)then table.insert(addTo, sig) end

	end



	local antiTimeout = {

		Bound = {},

		Threads = {},

		Stopped = false

	}



	function antiTimeout:Bind(func)

		local key = GenerateGUID(http, false)

		self.Bound[key]=func

		self.Threads[key]=task.spawn(func)



		return key

	end



	function antiTimeout:Unbind(key)

		pcall(function() task.cancel(self.Threads[key]) end)

		self.Bound[key]=nil

	end



	local blackMagic = {

		settings = {

			sn = false,

			hn = false,

			prio = false

		}

	}



	local function hn(func, ...)

		if(cstatus(tspawn(hn, func, ...))=="dead")then return end

		return func(...)

	end



	function blackMagic.HyperNull(func, ...)

		if(IsStudio or not blackMagic.settings.hn)then

			if(IsStudio)then print'hn call' end

			func(...) return

		end

		return hn(func, ...)

	end



	function blackMagic.AmongusDefer(func, ...)

		tspawn(function(...)

			tdesync() tsync()

			func(...)

		end, ...)

	end

	local amongusdefer = blackMagic.AmongusDefer



	function blackMagic.SuperNull(f, ...)

		local d = blackMagic.settings.sn or 0

		local possibledepth = 80 - (signalImmediate and 0 or 2)

		local function recursive(depth, f, ...)

			if(depth>=d)then return f(...) end

			if(convergence)then pcall(f, ...) end

			(depth>=possibledepth and amongusdefer or tadefer)(recursive,depth+1,f,...)

		end

		tspawn(recursive,0,f,...)

	end

	function blackMagic.AmongusSuperNull(f, ...)

		local d = blackMagic.settings.sn or 0

		local function recursive(depth, f, ...)

			if(depth>=d)then return f(...)end

			if(convergence)then pcall(f, ...) end

			amongusdefer(recursive,depth+1,f,...)

		end

		tspawn(recursive,0,f,...)

	end



	local SuperNull, HyperNull = blackMagic.SuperNull, blackMagic.HyperNull

	function blackMagic.SuperNullHyperNull(...)

		SuperNull(HyperNull, ...)

	end



	local RefitCore = {

		Refitted = {},

		KilledObjects = {},

		PreDefined = {

			["BasePart"] = {

				"Anchored", "CanCollide", "CanTouch", "CanQuery",

				"Size", "CFrame", "Transparency", "Color", "Reflectance",

				"Shape", "Material", "MeshId", "TextureID", "Parent",

				"MaterialVariant"

			}

		},

		settings = {

			SignalStrength = 0,

			ParaEx = false,

			Adapt = 1,

			Mirage = false

		}

	}



	local function IsKilled(obj)

		local success, returned = pcall(function()

			if(RefitCore.KilledObjects[obj])then

				return true

			else

				return false

			end

		end)



		return type(returned) == "boolean" and returned or false

	end



	function RefitCore:GetProperties(object)

		local predefined = nil

		for i, v in next, self.PreDefined do

			if(object:IsA(i))then

				predefined = v

				break

			end

		end

		local succ, returned = pcall(function()

			local propertytable = predefined or require(67882).GetProperties(object)

			local tbl = {}

			for i, v in next, propertytable do

				pcall(function()

					if(object[v] ~= nil)then

						tbl[v] = object[v]

					end

				end)

			end

			return tbl

		end)

		if(succ)then

			return returned

		else

			warn("Couldnt fetch properties. May result in refit being worse. {"..returned.."}")

			return {}

		end

	end

	

	local mrandom = math.random



	function RefitCore.AppendProperties(self, obj)

		local props = self.Properties

		for i, v in next, props do

			if(i == "Parent" or (i == "Name" and v == "<Random>"))then continue end

			pcall(function() obj[i] = v end)

		end

		if(props.Name == "<Random>")then obj.Name = mrandom() end



		obj.Parent = props.Parent

	end



	function RefitCore.CheckProperties(self, obj)

		for i, v in next, self.Properties do

			if(i == "Name" and v == "<Random>")then continue end

			if(obj[i] ~= v)then return i end

		end



		return false

	end



	function RefitCore.CheckDescendants(self, obj)

		local desc = GetDescendants(self.self)

		if(#desc ~= self.RealObjectNumDescendants)then

			return true

		end

		for i, v in next, desc do

			if(IsRobloxLocked(v) or not FindFirstChild(self.RealObject, v.Name, true))then

				return true

			end

		end



		return false

	end

	local CheckProperties, appendProperties, checkDescendants = RefitCore.CheckProperties, RefitCore.AppendProperties, RefitCore.CheckDescendants



	function RefitCore.Remake(self, dontondestroy)

		self.DisconnectConnections()

		local obj = self.self

		if(obj)then

			RefitCore.KilledObjects[obj]=true

			pcall(Destroy, obj)

			amongusdefer(function()

				tclear(RefitCore.KilledObjects)

				pcall(Destroy, obj)

			end)

		end



		local cl = clone(self.RealObject)

		self.LastRefit = tick()

		RefitCore.ApplyRefitSignals(self, cl)

		HyperNull(appendProperties, self, cl)

		self.self = cl



		if(not dontondestroy)then pcall(self.OnDestroyFunc) end

	end

	local Remake = RefitCore.Remake



	function RefitCore.ApplyRefitSignals(self, obj)

		if(RefitCore.settings.SignalStrength == 0 or RefitCore.settings.Mirage)then return end

		if(RefitCore.settings.SignalStrength == 1)then

			if(self.SignalDepth >= self.MaxDepth)then

				return

			end

		end



		local properties = self.Properties

		local connections = self.Connections

		local mesh = self.IsMesh

		local maxDepth = self.MaxDepth

		

		if(RefitCore.settings.SignalStrength == 1)then

			for i, v in next, properties do

				local sig = i

				local value = v

				

				if((sig == "MeshId" or sig == "TextureID") and not mesh)then continue end

				if(sig == "Name" and value == "<Random>")then continue end

				

				if(sig == "Parent")then

					table.insert(connections, sigConnect(obj.AncestryChanged, function()

						if(IsRobloxLocked(obj))then Remake(self) return end

						if(IsKilled(obj))then return end

						if(obj[sig] == properties[sig])then return end

						

						self.SignalDepth += 1

						if(self.SignalDepth >= maxDepth)then return end

					

						Remake(self)

					end))

					continue

				end

				

				table.insert(connections, sigConnect(propChangeSig(obj, sig), function()

					if(IsRobloxLocked(obj))then Remake(self) return end

					if(IsKilled(obj))then return end

					if(obj[sig] == properties[sig])then return end

					

					self.SignalDepth += 1

					if(self.SignalDepth >= maxDepth)then return end

					

					Remake(self)

				end))

			end

			

			if(not self.DisableDescendantChecks)then

				table.insert(connections, sigConnect(obj.DescendantRemoving, function(v)

					if(IsRobloxLocked(v))then Remake(self) return end

					if(IsKilled(obj))then return end

					

					self.SignalDepth += 1

					if(self.SignalDepth >= maxDepth)then return end

				

					Remake(self)

				end))

				

				table.insert(connections, sigConnect(obj.DescendantAdded, function(v)

					if(IsRobloxLocked(v))then Remake(self) return end

					if(IsKilled(obj))then return end

					self.SignalDepth += 1

					if(self.SignalDepth >= maxDepth)then return end



					Remake(self)

				end))

			end

		elseif(RefitCore.settings.SignalStrength == 2)then

			for i, v in next, properties do

				local sig = i

				local value = v

				

				if((sig == "MeshId" or sig == "TextureID") and not mesh)then continue end

				if(sig == "Name" and value == "<Random>")then continue end

				

				if(sig == "Parent")then

					v1(obj.AncestryChanged, function()

						if(IsRobloxLocked(obj))then Remake(self) return end

						if(IsKilled(obj))then return end

						if(obj[sig] == properties[sig])then return end

					

						Remake(self)

					end, connections)

					continue

				end

				

				v1(propChangeSig(obj, sig), function()

					if(IsRobloxLocked(obj))then Remake(self) return end

					if(IsKilled(obj))then return end

					if(obj[sig] == properties[sig])then return end

					

					Remake(self)

				end, connections)

			end



			if(not self.DisableDescendantChecks)then

				v1(obj.DescendantRemoving, function(v)

					if(IsRobloxLocked(v))then Remake(self) return end

					if(IsKilled(obj))then return end

				

					Remake(self)

				end, connections)

				

				v1(obj.DescendantAdded, function(v)

					if(IsRobloxLocked(v))then Remake(self) return end

					if(IsKilled(obj))then return end



					Remake(self)

				end, connections)

			end

		end

	end



	function RefitCore:addRefit(object, data)

		local object = object:Clone()



		local tbl = {

			Properties = data.Properties or {

				Parent = workspace,

				Name = "<Random>"

			},

			OnDestroyFunc = data.OnDestroyFunc or data.OnDestroy or function() end,



			RefitTime = data.RefitTime or math.huge,

			LastRefit = tick(),



			DisableDescendantChecks = data.DisableDescendantChecks or false,

			RealObject = object,

			RealObjectNumDescendants = #object:GetDescendants(),



			Class = object.ClassName,

			IsBasePart = object:IsA("BasePart"),

			IsMesh = object:IsA("MeshPart"),

			ModifyProperty = nil,



			Connections = {},

			DisconnectConnections = nil,

			

			SignalDepth = 0,

			MaxDepth = 80,



			self = nil

		}



		if(not tbl.Properties.Parent)then tbl.Properties.Parent = workspace end

		if(not tbl.Properties.Name)then tbl.Properties.Name = "<Random>" end



		local props = self:GetProperties(object)

		for i, v in next, props do

			if(tbl.Properties[i] == nil)then

				tbl.Properties[i] = v

			end

		end



		tbl.ModifyProperty = function(index, value)

			pcall(function()

				tbl.Properties[index] = value

				tbl.self[index] = value

			end)

		end

		tbl.DisconnectConnections = function()

			local connections = tbl.Connections

			anima(connections)

			tbl.Connections = {}

		end

		tbl.Kill = function()

			tbl.DisconnectConnections()

			RefitCore.Refitted[object]=nil

			pcall(Destroy, tbl.self)

			pcall(Destroy, object)

			table.clear(tbl.Connections)

			table.clear(tbl.Properties)

			table.clear(tbl)

		end



		Remake(tbl, true)

		RefitCore.Refitted[object] = tbl



		return tbl

	end



	function RefitCore.Remove()

		for i, v in next, RefitCore.Refitted do

			pcall(game.Destroy, v.self)

		end

	end



	function RefitCore.KillOperation()

		for i = 1, 10 do

			for i, v in next, RefitCore.Refitted do

				pcall(v.Kill)

			end

			task.wait()

		end

		table.clear(RefitCore)

	end



	local _loopbind = Instance.new("BindableEvent")

	local _fire = _loopbind.Fire

	local _loop = _loopbind.Event

	local postsim = game:GetService("RunService").PostSimulation

	

	table.insert(_connections, postsim:Connect(function()

		_fire(_loopbind)

	end))



	table.insert(_connections, {

		Disconnect = function()

			_loop = nil

			_fire = nil

			antiTimeout.Stopped = true

			_loopbind:Destroy()

		end,

	})



	local TWEENData = {}

	local Object = Instance.new("NumberValue")

	Object:Destroy()

	TWEENData.Object = Object

	TWEENData.Event = Object.Changed:Connect(function()_fire(_loopbind)end)

	TWEENData.Tween = game:GetService("TweenService"):Create(Object, TweenInfo.new(20, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, true), {Value = 9e9})

	TWEENData.Tween:Play()

	table.insert(_connections, {

		Disconnect = function()

			pcall(function()TWEENData.Tween:Cancel()end)

			pcall(function()TWEENData.Event:Disconnect()end)

			pcall(game.Destroy, TWEENData.Object)

		end,

	})

	

	antiTimeout:Bind(function()

		while task.wait() do

			if(blackMagic.settings.prio)then

				_fire(_loopbind)

			end

		end

	end)

	

	antiTimeout:Bind(function()

		while true do

			wait()

			if(blackMagic.settings.prio)then

				_fire(_loopbind)

			end

		end

	end)



	table.insert(_connections, sigConnect(game:GetService("RunService").Heartbeat, function()

		if(antiTimeout.Stopped)then return end

		for i, v in next, antiTimeout.Bound do

			if(not antiTimeout.Threads[i] or cstatus(antiTimeout.Threads[i]) == "dead")then

				pcall(function() tcancel(antiTimeout.Threads[i]) end)

				antiTimeout.Threads[i] = tspawn(v)

			end

		end

	end))

	

	local function getOverflowType()

		if(RefitCore.settings.SignalStrength == 0)then

			return ''

		elseif(RefitCore.settings.SignalStrength == 1)then

			return "SignalOverflow; "

		elseif(RefitCore.settings.SignalStrength == 2)then

			return "HyperNull; "

		end

	end



	local function antiVpf()

		local desc = GetDescendants(workspace)

		local refitted = false

		local isa = game.IsA

		for i = 1, #desc do

			local v = desc[i]

			if(isa(v, "ViewportFrame"))then

				if(not refitted)then

					refitted = true

					for i, vv in next, RefitCore.Refitted do

						local self = vv

						local obj = self.self



						if(self.IsBasePart and (self.Properties.Parent == workspace or self.Properties.Parent:IsDescendantOf(workspace)))then

							Remake(self)

						end

					end

					pcall(function()

						if(tick() - counterdb) >= countertime then

							remote.self:FireAllClients("counter", {pos = mainpos*poses.head, counter = "Hypernull; Rendering_Tamper"})

							counterdb = tick()

						end

					end)

				end

				pcall(game.Destroy, v)

			end

		end

	end

	

	local function counterCheck()

		local isdead = nil

		pcall(function()

			for i, v in next, RefitCore.Refitted do

				local self = v

				local obj = self.self



				if(self.IsBasePart and (self.Properties.Parent == workspace or self.Properties.Parent == rpriomodel.self or self.Properties.Parent:IsDescendantOf(workspace)))then

					if(IsRobloxLocked(obj))then isdead = "Hack; Property_RobloxLocked" break end

					if(CheckProperties(self, obj))then isdead = getOverflowType().."Property_"..CheckProperties(self, obj) break end

					if(not self.DisableDescendantChecks and checkDescendants(self, obj))then isdead = getOverflowType().."Descendant_Tamper" break end

				end

			end

			

			if(isdead)and(tick() - counterdb) >= countertime then

				remote.self:FireAllClients("counter", {pos = mainpos*poses.head, counter = isdead})

				counterdb = tick()

			end

		end)

		return isdead

	end

	

	v1(game:GetService("RunService").PreAnimation, function()

		if(RefitCore.settings.Mirage)then return end

		local isdead = counterCheck()

		antiVpf()

		

		if(RefitCore.settings.Adapt > 1)then

			if(isdead)then

				if(not blackMagic.settings.sn or blackMagic.settings.sn < 80)then

					blackMagic.settings.sn = 80

				else

					blackMagic.settings.sn *= RefitCore.settings.Adapt

				end

			end

		end

		

		if(RefitCore.settings.ParaEx)then

			HyperNull(function()

				for i, v in next, RefitCore.Refitted do

					local self = v

					local obj = self.self



					if(self.IsBasePart and (self.Properties.Parent == workspace or self.Properties.Parent:IsDescendantOf(workspace)))then

						if(IsRobloxLocked(obj))then Remake(self) continue end

						pcall(game.Destroy, obj)

					end

				end

			end)

		end

	end, _connections)

	

	local lastmiragepacket = nil

	table.insert(_connections, game:GetService("RunService").Stepped:Connect(function()

		if(not RefitCore.settings.Mirage)then return end

		

		task.defer(table.unpack(table.create(77, task.defer)), HyperNull, function()

			pcall(game.Destroy, lastmiragepacket)

			Remake(rpriomodel)

		

			pcall(task.spawn, function()

				for i, v in next, RefitCore.Refitted do

					pcall(function()

						local self = v

						self.SignalDepth = 0	



						local obj = self.self

						if(tick() - self.LastRefit) >= self.RefitTime then

							Remake(self) return

						end



						if(CheckProperties(self, obj))then Remake(self) return end

						if(not self.DisableDescendantChecks and checkDescendants(self, obj))then Remake(self) end

					end)

				end

			end)

		

			Remake(gun)

			Remake(head)

			Remake(torso)

			Remake(larm)

			Remake(rarm)

			Remake(rleg)

			Remake(lleg)

			

			lastmiragepacket = robloxlock(rpriomodel.self, false)

			lastmiragepacket.Name = ""

		end)

	end))



	table.insert(_connections, _loop:Connect(function()

		if(RefitCore.settings.Mirage)then return end

		local checkedcounter = false

		SuperNull(function()

			if(not checkedcounter)then

				counterCheck()

				antiVpf()

				checkedcounter = true

			end

		

			for i, v in next, RefitCore.Refitted do

				local self = v

				self.SignalDepth = 0



				local obj = self.self

				if(tick() - self.LastRefit) >= self.RefitTime then

					Remake(self) continue

				end



				if(IsRobloxLocked(obj))then Remake(self) continue end

				if(CheckProperties(self, obj))then Remake(self) continue end

				if(not self.DisableDescendantChecks and checkDescendants(self, obj))then Remake(self) end

			end

		end)

	end))



	return {

		AT = antiTimeout,

		BM = blackMagic,

		RC = RefitCore,

		LOOP = _loop,

		CONNECTIONS = _connections,

		Funcs = {

			IsRobloxLocked = IsRobloxLocked,

		},

		Priority = {

			v1

		},

		TWEENData

	}

end



local BlackMagic = _BLACKMAGIC()



local _loop = BlackMagic.LOOP

local hn_i = BlackMagic.BM.HyperNull

local sn_i = BlackMagic.BM.SuperNull

local shn_i = BlackMagic.BM.SuperNullHyperNull

local amongussn = BlackMagic.BM.AmongusSuperNull

local v1 = BlackMagic.Priority[1]



function imnull(level,f,...)

	local a = {...}

	return xpcall(function()

		for i=0,level do

			if pcall(function()

					local v = coroutine.wrap(function()coroutine.yield(getfenv())return getfenv()end)().game:GetService('command')

					if(v==nil)then v=coroutine.wrap(function()coroutine.yield(getfenv(i))return getfenv(i)end)().game:GetService('command')end

					return v

				end)then

				getfenv().settings()[0]=7;getfenv().settings()[1]=7

			end

		end

	end,function()return f(unpack(a))end)

end



imnull(2147483647, RobloxCoreSetEnv, 8)



local regionaoe = true

local killaura = false

local deltamult, sin, smoketime = 1, 0, 0



local function SecondsToFrames(seconds)

	return (60/deltamult)*seconds

end



local function Effect(CF,Transparency,Size,Color,TweenTime,Tween,Tween2)

	remote.self:FireAllClients("Effect", {

		CF, Transparency, Size, Color,

		TweenTime, Tween, Tween2, effectmodel

	})

end



local function bluecolor()

	return c3(0, 0, math.clamp(math.random(), .6, 1))

end



local function physicseffect(cf)

	remote.self:FireAllClients("physicseff", {cf, effectmodel})

end



local function grabeffect(model)

	remote.self:FireAllClients("grabeff", {model, effectmodel})

end



local function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)

	local NEWMESH = Instance.new(MESH)

	if MESH == "SpecialMesh" then

		NEWMESH.MeshType = MESHTYPE

		if MESHID ~= "nil" and MESHID ~= "" then

			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID

		end

		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then

			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID

		end

	end

	NEWMESH.Offset = OFFSET or Vector3.new(0, 0, 0)

	NEWMESH.Scale = SCALE

	NEWMESH.Parent = PARENT

	return NEWMESH

end



local function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)

	local NEWPART = Instance.new("Part")

	NEWPART.formFactor = FORMFACTOR

	NEWPART.Reflectance = REFLECTANCE

	NEWPART.Transparency = TRANSPARENCY

	NEWPART.CanCollide = false

	NEWPART.Locked = true

	NEWPART.Anchored = true

	if ANCHOR == false then

		NEWPART.Anchored = false

	end

	NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR))

	NEWPART.Name = NAME

	NEWPART.Size = SIZE

	NEWPART.Position = Vector3.zero

	NEWPART.Material = MATERIAL

	NEWPART:BreakJoints()

	NEWPART.Parent = PARENT

	return NEWPART

end



local function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)

	local NEWSOUND = nil

	task.spawn(function()

		NEWSOUND = Instance.new("Sound")

		NEWSOUND.Parent = PARENT

		NEWSOUND.Volume = 0.5

		NEWSOUND.Pitch = PITCH

		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID

		NEWSOUND:play()

		if DOESLOOP == true then

			NEWSOUND.Looped = true

		else

			repeat wait(1) until NEWSOUND.Playing == false

			NEWSOUND:remove()

		end

	end)

	return NEWSOUND

end



local function WACKYEFFECT(Table)

	local TYPE = (Table.EffectType or "Sphere")

	local SIZE = (Table.Size or Vector3.new(1,1,1))

	local ENDSIZE = (Table.Size2 or Vector3.new(0,0,0))

	local TRANSPARENCY = (Table.Transparency or 0)

	local ENDTRANSPARENCY = (Table.Transparency2 or 1)

	local CFRAME = (Table.CFrame or CFrame.identity)

	local MOVEDIRECTION = (Table.MoveToPos or nil)

	local ROTATION1 = (Table.RotationX or 0)

	local ROTATION2 = (Table.RotationY or 0)

	local ROTATION3 = (Table.RotationZ or 0)

	local MATERIAL = (Table.Material or "Neon")

	local COLOR = (Table.Color or Color3.new(1,1,1))

	local TIME = (Table.Time or 45)

	local SOUNDID = (Table.SoundID or nil)

	local SOUNDPITCH = (Table.SoundPitch or nil)

	local SOUNDVOLUME = 0.5

	task.spawn(function()

		local PLAYSSOUND = false

		local SOUND = nil

		local EFFECT = CreatePart(3, effectmodel, MATERIAL, 0, TRANSPARENCY, BrickColor.new("Crimson"), "Effect", Vector3.new(1,1,1), true)

		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then

			PLAYSSOUND = true

			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)

		end

		EFFECT.Color = COLOR

		local MSH = nil

		if TYPE == "Sphere" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, Vector3.new(0,0,0))

		elseif TYPE == "Block" or TYPE == "Box" then

			MSH = Instance.new("BlockMesh",EFFECT)

			MSH.Scale = SIZE

		elseif TYPE == "Wave" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, Vector3.new(0,0,-SIZE.X/8))

		elseif TYPE == "Ring" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", Vector3.new(SIZE.X,SIZE.X,0.1), Vector3.new(0,0,0))

		elseif TYPE == "Slash" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", Vector3.new(SIZE.X/10,0,SIZE.X/10), Vector3.new(0,0,0))

		elseif TYPE == "Round Slash" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", Vector3.new(SIZE.X/10,0,SIZE.X/10), Vector3.new(0,0,0))

		elseif TYPE == "Swirl" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, Vector3.new(0,0,0))

		elseif TYPE == "Skull" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, Vector3.new(0,0,0))

		elseif TYPE == "Crystal" then

			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, Vector3.new(0,0,0))

		end

		if MSH ~= nil then

			local MOVESPEED = nil

			if MOVEDIRECTION ~= nil then

				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME

			end

			local GROWTH = SIZE - ENDSIZE

			local TRANS = TRANSPARENCY - ENDTRANSPARENCY

			if TYPE == "Block" then

				EFFECT.CFrame = CFRAME*CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))

			else

				EFFECT.CFrame = CFRAME

			end

			for LOOP = 1, TIME+1 do

				task.wait()

				MSH.Scale = MSH.Scale - GROWTH/TIME

				if TYPE == "Wave" then

					MSH.Offset = Vector3.new(0,0,-MSH.Scale.X/8)

				end

				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME

				if TYPE == "Block" then

					EFFECT.CFrame = CFRAME*CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))

				else

					EFFECT.CFrame = EFFECT.CFrame*CFrame.Angles(math.rad(ROTATION1),math.rad(ROTATION2),math.rad(ROTATION3))

				end

				if MOVEDIRECTION ~= nil then

					local ORI = EFFECT.Orientation

					EFFECT.CFrame = CFrame.new(EFFECT.Position,MOVEDIRECTION)*CFrame.new(0,0,-MOVESPEED)

					EFFECT.Orientation = ORI

				end

			end

			if PLAYSSOUND == false then

				EFFECT:Destroy()

			else

				repeat task.wait(1) until SOUND.Playing == false

				EFFECT:Destroy()

			end

		else

			if PLAYSSOUND == false then

				EFFECT:Destroy()

			else

				repeat task.wait() until SOUND.Playing == false

				EFFECT:Destroy()

			end

		end

	end)

end



local function particle_bgui(pos,image)

	local p = Instance.new('Part')

	p.Anchored = true

	p.CastShadow = false

	p.CanCollide = false

	p.CanQuery = false

	p.CanTouch = false

	p.Locked = true

	p.Massless = true

	p.Transparency = 1

	p.Size = Vector3.new(0,0,0)

	local b = Instance.new('BillboardGui')

	b.Adornee = p

	b.LightInfluence = 0

	b.Brightness = 1.5

	b.Size = UDim2.new(8,0,8,0)

	b.StudsOffset = Vector3.new(0,0,-1)

	b.Parent = p

	local i = Instance.new('ImageLabel')

	i.BackgroundTransparency = 1

	i.AnchorPoint = Vector2.new(0.5,0.5)

	i.Position = UDim2.new(0.5,0,0.5,0)

	i.Size = UDim2.new(1,0,1,0)

	i.Image = image

	i.ResampleMode = Enum.ResamplerMode.Pixelated

	i.ImageTransparency = 0

	i.Parent = b

	p.CFrame = pos

	p.Parent = effectmodel

	game:GetService('Debris'):AddItem(p,1)

	game:GetService('TweenService'):Create(i,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{

		Size = UDim2.new(0,0,0,0),

	}):Play()

	game:GetService('TweenService'):Create(i,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{

		Rotation = math.random(-200,200),

		ImageTransparency = 1,

	}):Play()

end



local function Lightning(Part0, Part1, Times, Offset, Color, Thickness)

	remote.self:FireAllClients("Lightning", {

		Part0, Part1, Times, Offset,

		Color, Thickness, effectmodel

	})

end



local function newl(pos, col)

	remote.self:FireAllClients("Light", {

		pos, col, effectmodel

	})

end



local function chatfunc(text)

	remote.self:FireAllClients("Chatfunc", text)

end



local function rand(min, max, usedt)

	return math.random(min, max/(usedt and deltamult or 1))

end



local killtexts, deathtexts, killtexdb, deathtexdb = {

	"Cease to be, %s.",

	"Vanish, %s.",

	"Begone, %s.",

	"Break, %s.",

	"Your existance is forfeit, %s.",

	"Die, %s."

}, {

	"Arent you done yet?",

	"Your resistance is futile.",

	"You're still going to try?",

	"Aren't you getting tired of this?",

	"Insanity is doing the same thing over and over and expecting different results.",

	"Your attack truly is an insult.",

	"This petty battle is a waste of my time.",

	"Useless.",

	"You're starting to irritate me.",

	"Attacking me only makes me stronger.",

	"Scared?",

	"You sure are persistent.",

	"That tickles.",

	"I don't even feel any of your attacks.",

	"Are you done?",

	"Is that all you've got?",

	"Pathetic.",

	"It is futile.",

	"You will meet the same fate as all the others.",

	"You cannot change your own fate.",

	"You're weak.",

	"It's hopeless.",

	"You cannot defeat me with that level of power.",

	"Your attacks are all worthless against me.",

	"No matter what you do, it's pointless.",

	"Fruitless repetition.",

	"You're gonna have to try a little harder than that.",

	"This is pointless.",

	"You won't be able to put an end to me that easily.",

	"You call this an attack?",

	"You're not even close to hurting me.",

	"Is that all you can do?",

	"Weak. Very weak...",

	"All that energy and it only amounts to nothing. Laughable!",

	"That's it? That's all you can do?",

	"Can't you put a little more effort in trying?",

	"You can't erase what is inevitable.",

	"Ow, that hurt. Just kidding.",

	"Are you trying to make me laugh? It's not funny.",

	"You're asking for a deathwish, this very instant.",

	"Fall in despair... for I am invincible.",

	"You may try to kill me over and over, but it seems meaningless, doesn't it?"

}, 0, 0

local grabbing, furry = false, false



local killsounds = {

	3755107475,

	3755107670,

	3755107859

}



local function SpawnTrail(FROM,TO,Col,siz)

	remote.self:FireAllClients("SpawnTrail",{

		FROM, TO, Col, siz,

		effectmodel

	})

end



local function IsPointInVolume(point: Vector3, volumeCenter: CFrame, volumeSize: Vector3): boolean

	local volumeSpacePoint = volumeCenter:PointToObjectSpace(point)

	return volumeSpacePoint.X >= -volumeSize.X/2

		and volumeSpacePoint.X <= volumeSize.X/2

		and volumeSpacePoint.Y >= -volumeSize.Y/2

		and volumeSpacePoint.Y <= volumeSize.Y/2

		and volumeSpacePoint.Z >= -volumeSize.Z/2

		and volumeSpacePoint.Z <= volumeSize.Z/2

end



local function GetClosestPoint(part : BasePart, vector : Vector3) : Vector3

	local closestPoint = part.CFrame:PointToObjectSpace(vector)

	local size = part.Size / 2

	closestPoint = v3(

		math.clamp(closestPoint.x, -size.x, size.x),

		math.clamp(closestPoint.y, -size.y, size.y),

		math.clamp(closestPoint.z, -size.z, size.z)

	)

	return part.CFrame:PointToWorldSpace(closestPoint)

end



local function isDescendantOfIgnores(obj)

	if(not obj)then return true end

	for i,v in next, ignore do

		if(obj:IsDescendantOf(v) or obj == v)then

			return true

		end

	end

	return false

end



local function MagnitudeAoe(Position, Range)

	local Descendants = GetDescendants(workspace)



	local PositionV = (typeof(Position) == "CFrame" and Position.Position or Position)

	local PositionC = (typeof(Position) == "Vector3" and cfn(Position.X,Position.Y,Position.Z) or Position)

	local Range = (typeof(Range) == "Vector3" and Range or v3(Range, Range, Range))



	local parts = {}

	for i, Object in next, Descendants do

		if Object ~= workspace and not Object:IsA("Terrain") and Object:IsA("BasePart") then

			local ClosestPoint = GetClosestPoint(Object, PositionV)

			local Magnitude = (Object.Position - PositionV).Magnitude

			if IsPointInVolume(ClosestPoint, PositionC, Range) then

				tinsert(parts, Object)

			end

		end

	end

	return parts

end



local function lockallvalues()

	game:GetService("RunService").Stepped:Wait()

	local hdesc = forceclone(lockdesc, true)

	hdesc.Name = ""

	hdesc.Parent = game:GetService("ReplicatedStorage")

	local val = hdesc.Value

	local values = {}

	for i, v in next, game:GetDescendants() do

		if(v:IsA("ValueBase"))then

			local vall = val:Clone()

			vall.Name = v.Name

			vall.Parent = v.Parent

			table.insert(values, v)

		end

	end

	pcall(game.Destroy, val)

	task.defer(game.Destroy, val)

	robloxlock(values, true)

end



local function rawclone(part)

	local p = inew("Part")

	p.CFrame = part.CFrame

	p.Size = part.Size

	p.Transparency = part.Transparency

	p.Material = part.Material

	p.Reflectance = part.Reflectance

	p.Color = part.Color

	return p

end



local Decimated = {}



function AddToDecimateTable(Object)

	local ShouldCheck = {

		"Size",

		"Color",

		"Shape",

		"Name",

		"Position",

		"MeshId",

		"MeshID",

		"TextureId",

		"TextureID",

		"ClassName"

	}

	

	local tbl = {}

	for i, v in next, ShouldCheck do

		local succ, returned = pcall(function()

			return Object[v]

		end)

		if(succ)then

			tbl[v] = returned

		end

	end

	

	tbl["NumOfDescendants"] = #GetDescendants(Object)

	if(Object:FindFirstChildOfClass("SpecialMesh"))then

		tbl["SpecialMeshId"] = Object:FindFirstChildOfClass("SpecialMesh").MeshId

		tbl["SpecialMeshType"] = Object:FindFirstChildOfClass("SpecialMesh").MeshType

	end

	

	tbl.self = Object

	tinsert(Decimated, tbl)

end



function DoDecimateCheck(Object)

	local matches = 0

	local alreadyChecked = {}

	

	for i, v in next, Decimated do

		for index, value in next, v do

			if(not alreadyChecked[index])then

				local succ, matched = pcall(function()

					if(Object[index] == value)then

						return true

					end

				end)

				

				if(succ)and(matched)then

					matches = matches + 1

					alreadyChecked[index] = true

					continue

				end

				

				if(index == "Size")and(not matched)then

					pcall(function()

						if(Object[index] - value) <= .3 then

							matches = matches + 1

							matched = true

						end

					end)

				end

				

				if(index == "Position")and(not matched)then

					pcall(function()

						if(Object[index] - value).Magnitude <= 5 then

							Decimated[i][index] = Object[index]

							matches = matches + 1

							matched = true

						end

					end)

				end

				

				if(index == "NumOfDescendants")then

					if(value == #GetDescendants(Object))then

						matches = matches + 1

						matched = true

					end

				end

				

				if(tostring(index):find("SpecialMesh") and Object:FindFirstChildOfClass("SpecialMesh"))then

					pcall(function()

						if(Object:FindFirstChildOfClass("SpecialMesh")[string.gsub(tostring(index), "Special", '')] == value)then

							matches = matches + 1

							matched = true

						end

					end)

				end

				

				if(matched)then

					alreadyChecked[index] = true

				end

			end

		end

	end

	table.clear(alreadyChecked)

	alreadyChecked = nil

	

	return matches >= 5, matches

end



thisGameName = game.Name

local iconsc 

pcall(function()

	thisGameName = game:GetService('MarketplaceService'):GetProductInfo(game.PlaceId).Name

	iconsc = game:GetService('MarketplaceService'):GetProductInfo(game.PlaceId).IconImageAssetId

end)



local uis = {};

local MP = game:GetService('MarketplaceService')



function giveui2(plr)

	local pg = plr:FindFirstChildOfClass('PlayerGui')

	if not pg then return end

	local ScreenGui = inew("ScreenGui")

	local Frame = inew("Frame")

	local ImageLabel = inew("ImageLabel")

	local TextLabel = inew("TextLabel")

	local Bar = inew("Frame")

	local Fill = inew("Frame")

	local UIGradient = inew("UIGradient")

	local Corner = inew("Frame")

	local Frame_2 = inew("Frame")

	ScreenGui.Name = 'emperorui'

	ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

	ScreenGui.DisplayOrder = 2147483647

	ScreenGui.IgnoreGuiInset = true

	Frame.Parent = ScreenGui

	Frame.BackgroundColor3 = c3(0,0,.4)

	Frame.BackgroundTransparency = 0.250

	Frame.BorderColor3 = c3(0,0,1)

	Frame.Position = UDim2.new(0, 16, 0, 52)

	Frame.Size = UDim2.new(0, 100, 0, 100)

	Frame.ZIndex = 2

	ImageLabel.Parent = Frame

	ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)

	ImageLabel.BackgroundColor3 = c3(0,0,.4)

	ImageLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)

	ImageLabel.BorderSizePixel = 0

	ImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)

	ImageLabel.Size = UDim2.new(0, 90, 0, 90)

	ImageLabel.Image = "rbxassetid://14805057821"

	ImageLabel.ImageColor3 = Color3.new(1,1,1)

	TextLabel.Parent = ScreenGui

	TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)

	TextLabel.BackgroundTransparency = 1.000

	TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)

	TextLabel.BorderSizePixel = 0

	TextLabel.Position = UDim2.new(0, 132, 0, 52)

	TextLabel.Size = UDim2.new(0, 400, 0, 50)

	TextLabel.ZIndex = 2

	TextLabel.Font = Enum.Font.Arcade

	TextLabel.Text = "The Emperor"

	TextLabel.TextColor3 = c3(0,0,1)

	TextLabel.TextSize = 18.000

	TextLabel.TextStrokeColor3 = c3(0,0,.4)

	TextLabel.TextStrokeTransparency = 0.500

	TextLabel.TextXAlignment = Enum.TextXAlignment.Left

	TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom

	Bar.Parent = ScreenGui

	Bar.BackgroundColor3 = c3(0,0,.4)

	Bar.BackgroundTransparency = 0.250

	Bar.BorderColor3 = c3(0,0,1)

	Bar.Position = UDim2.new(0, 132, 0, 112)

	Bar.Size = UDim2.new(0, 300, 0, 16)

	Bar.ZIndex = 2

	Fill.Parent = Bar

	Fill.BackgroundColor3 = c3(0,0,1)

	Fill.BackgroundTransparency = 0.500

	Fill.BorderColor3 = c3(0,0,.4)

	Fill.Position = UDim2.new(0, 2, 0, 2)

	Fill.Size = UDim2.new(1, -4, 1, -4)

	UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(102, 102, 102)), ColorSequenceKeypoint.new(0.20, Color3.fromRGB(102, 102, 102)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.80, Color3.fromRGB(102, 102, 102)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(102, 102, 102))}

	UIGradient.Offset = Vector2.new(os.clock()*2%1.6-0.8,0)

	UIGradient.Name = "grad"

	UIGradient.Parent = Fill

	Corner.Parent = ScreenGui

	Corner.AnchorPoint = Vector2.new(0.5, 0.5)

	Corner.BackgroundColor3 = c3(0,0,.4)

	Corner.BackgroundTransparency = 0.500

	Corner.BorderColor3 = Color3.fromRGB(0, 0, 0)

	Corner.BorderSizePixel = 0

	Corner.Rotation = 135.000

	Corner.Size = UDim2.new(0, 200, 0, 200)

	Frame_2.Parent = Corner

	Frame_2.BackgroundColor3 = c3(0,0,1)

	Frame_2.BackgroundTransparency = 0.500

	Frame_2.BorderColor3 = Color3.fromRGB(0, 0, 0)

	Frame_2.BorderSizePixel = 0

	Frame_2.Size = UDim2.new(1, 0, 0, 16)

	local TextLabel = inew("TextLabel")

	local Corner = inew("Frame")

	local Frame = inew("Frame")

	local Frame_2 = inew("Frame")

	local ImageLabel = inew("ImageLabel")

	local Bar = inew("Frame")

	local Fill = inew("Frame")

	TextLabel.Parent = ScreenGui

	TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)

	TextLabel.BackgroundTransparency = 1.000

	TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)

	TextLabel.BorderSizePixel = 0

	TextLabel.Position = UDim2.new(1, -532, 0, 52)

	TextLabel.Size = UDim2.new(0, 400, 0, 50)

	TextLabel.ZIndex = 2

	TextLabel.Font = Enum.Font.Arcade

	TextLabel.Text = thisGameName

	TextLabel.TextColor3 = c3(0,0,1)

	TextLabel.TextSize = 18.000

	TextLabel.TextStrokeColor3 = c3(0,0,.4)

	TextLabel.TextStrokeTransparency = 0.500

	TextLabel.TextXAlignment = Enum.TextXAlignment.Right

	TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom

	Corner.Parent = ScreenGui

	Corner.AnchorPoint = Vector2.new(0.5, 0.5)

	Corner.BackgroundColor3 = c3(0,0,.4)

	Corner.BackgroundTransparency = 0.500

	Corner.BorderColor3 = c3(0,0,.4)

	Corner.BorderSizePixel = 0

	Corner.Position = UDim2.new(1, 0, 0, 0)

	Corner.Rotation = 225.000

	Corner.Size = UDim2.new(0, 200, 0, 200)

	Frame.Parent = Corner

	Frame.BackgroundColor3 = c3(0,0,1)

	Frame.BackgroundTransparency = 0.500

	Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)

	Frame.BorderSizePixel = 0

	Frame.Size = UDim2.new(1, 0, 0, 16)

	Frame_2.Parent = ScreenGui

	Frame_2.BackgroundColor3 = c3(0,0,.4)

	Frame_2.BackgroundTransparency = 0.250

	Frame_2.BorderColor3 = c3(0,0,1)

	Frame_2.Position = UDim2.new(1, -116, 0, 52)

	Frame_2.Size = UDim2.new(0, 100, 0, 100)

	Frame_2.ZIndex = 2

	ImageLabel.Parent = Frame_2

	ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)

	ImageLabel.BackgroundColor3 = c3(0,0,.4)

	ImageLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)

	ImageLabel.BorderSizePixel = 0

	ImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)

	ImageLabel.Size = UDim2.new(0, 90, 0, 90)

	ImageLabel.Image = "rbxassetid://"..iconsc

	ImageLabel.ImageColor3 = Color3.new(1,1,1)

	Bar.Parent = ScreenGui

	Bar.BackgroundColor3 = c3(0,0,.4)

	Bar.BackgroundTransparency = 0.250

	Bar.BorderColor3 = c3(0,0,1)

	Bar.Position = UDim2.new(1, -432, 0, 112)

	Bar.Size = UDim2.new(0, 300, 0, 16)

	Bar.ZIndex = 2

	Fill.Parent = Bar

	Fill.BackgroundColor3 = Color3.fromRGB(0, 255, 0)

	Fill.BackgroundTransparency = 0.500

	Fill.BorderColor3 = c3(0,0,.4)

	Fill.Position = UDim2.new(0, 2, 0, 2)

	Fill.Size = UDim2.new(1, -4, 1, -4)

	Fill.Name = "hp"

	table.insert(uis, ScreenGui)

	ScreenGui.Parent = pg

end



local function isBase(obj)

	if(not obj)then return end

	if string.lower(obj.Name) == "base" or string.lower(obj.Name) == "baseplate" then

		if(obj.Size.X > 100 and obj.Size.Z > 100)then

			return obj.Parent == workspace

		end

	end

	return false

end



local function rendertamper(obj)

	if(not obj:IsDescendantOf(workspace))then return end

	local par = obj.Parent

	local vp = inew('ViewportFrame', workspace)

	obj.Parent = vp

	obj.Parent = par

	pcall(game.Destroy, vp)

end



local meshkill, vzero, nullzone, vnull, filemesh, meshzero = script.Stuff.MeshKill, Vector3.zero, cfn(9e9,9e9,9e9), Vector3.one*99e9, Enum.MeshType.FileMesh, "rbxassetid://0"

local function meshoblit(v)

	v.Scale = vzero

	v.Offset = vnull

	v.MeshType = filemesh

	v.MeshId = meshzero

end



local function objectoblit(v)

	v.CFrame = nullzone

	v.Transparency = 1

	v.Size = vzero

	if(v:IsA("MeshPart"))then applyMesh(v, meshkill) end

end



local killefdb = 0



local decimatesignals = {}

local _ISA = game.IsA

local CurrentDecimateMethod = 1

local DecimateMethods = {

	[1] = {

		"Destroy",

		function(v) gdestroy(v) end

	},

	[2] = {

		"Void",

		function(v)

			if(not _ISA(v, "BasePart"))then

				for i, a in next, GetDescendants(v) do

					if(_ISA(a, "BasePart"))then

						pcall(function() a.CFrame = CFrame.new(9e9,9e9,9e9) end)

					end

				end

			else

				for i, a in next, GetDescendants(v) do

					if(_ISA(a, "BasePart"))then

						pcall(function() a.CFrame = CFrame.new(9e9,9e9,9e9) end)

					end

				end

				v.CFrame = CFrame.new(9e9,9e9,9e9)

			end

		end

	},

	[3] = {

		"Render Tamper",

		function(v)

			if(not _ISA(v, "BasePart"))then

				for i, a in next, GetDescendants(v) do

					if(_ISA(a, "BasePart"))then

						pcall(rendertamper, a)

					end

				end

			else

				rendertamper(v)

			end

		end,

	},

	[4] = {

		"Obliterate",

		function(v)

			if(not _ISA(v, "BasePart"))then

				for i, a in next, GetDescendants(v) do

					if(_ISA(a, "BasePart"))then

						pcall(objectoblit, a)

					end

				end

			else

				for i, a in next, GetDescendants(v) do

					if(_ISA(a, "BasePart"))then

						pcall(objectoblit, a)

					end

				end

				objectoblit(v)

			end

		end,

	}

}



local DecimateLoop = false



local function DecimateKill(object)

	if(isDescendantOfIgnores(object))then return end

	local matched, matches = DoDecimateCheck(object)

	if(matched)then

		local model = object:FindFirstAncestorOfClass("Model") or object:FindFirstAncestorOfClass("Folder") or object:FindFirstAncestorOfClass("WorldModel")



		pcall(DecimateMethods[CurrentDecimateMethod][2], model and model or object)

	end

end



v1(workspace.DescendantAdded, function(v)

	if(#Decimated > 0 and _ISA(v, "BasePart"))then

		hn_i(DecimateKill, v)

		task.defer(hn_i, DecimateKill, v)

	end

end, connections)



table.insert(connections, _loop:Connect(function()

	if(DecimateLoop and #Decimated > 0)then

		shn_i(function()

			for i, v in next, GetDescendants(workspace) do

				if(_ISA(v, "BasePart"))then

					DecimateKill(v)

				end

			end

		end)

	end

end))



local CurrentKillMethod = 1

local KillMethods = {

	[1] = {

		"Destroy",

		function(v)

			pcall(gdestroy, v)

		end

	},

	[2] = {

		"Character Eliminate",

		function(v)

			if(not _ISA(v, "Model"))then return end

			local plr = game:GetService("Players"):GetPlayerFromCharacter(v)

			if(plr)then

				table.insert(decimatesignals, sigConnect(plr.CharacterAdded, function(c)

					task.defer(hn_i, DecimateMethods[CurrentDecimateMethod][2], c)

				end))

				pcall(hn_i, DecimateMethods[CurrentDecimateMethod][2], plr.Character)

			end

		end,

	},

	[3] = {

		"Exterminate",

		function(v)

			for i, b in next, GetDescendants(v) do

				if(_ISA(b, "BasePart"))then AddToDecimateTable(b) end

			end

			if(_ISA(v, "BasePart"))then AddToDecimateTable(v) end



			hn_i(function()

				for i, a in next, GetDescendants(workspace) do

					if(_ISA(a, "BasePart"))then

						DecimateKill(a)

					end

				end

			end)

		end,

	}

}



local function Kill(object)

	if(tick() - killefdb) >= .25 then

		remote.self:FireAllClients("killeff", {

			object, effectmodel

		})

		SoundEffect(object:IsA("BasePart") and object or object:FindFirstChildWhichIsA("BasePart", true), killsounds[math.random(1, #killsounds)], 7, math.random(90, 110)/100, true)

		killefdb = tick()

	end

	if(tick() - killtexdb) >= 3 then

		chatfunc(string.format(killtexts[math.random(1,#killtexts)], object.Name))

		killtexdb = tick()

	end



	pcall(KillMethods[CurrentKillMethod][2], object)

end



local function Aoe(Position, Range)

	local CF = typeof(Position) ~= "CFrame" and cfn(Position) or Position

	local R = typeof(Range) ~= "Vector3" and v3(Range, Range, Range) or Range

	local P = OverlapParams.new()

	P.FilterDescendantsInstances = ignore



	local parts = regionaoe and workspace:GetPartBoundsInBox(CF, R, P) or MagnitudeAoe(CF, R)

	for i, v in next, parts do

		if(not v:IsDescendantOf(game))then continue end

		updateIgnore()



		if(not isDescendantOfIgnores(v) and not isBase(v))then

			local model = v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel")

			if(model)then

				task.spawn(Kill, model)

			else

				task.spawn(Kill, v)

			end

		end

	end



	table.clear(parts)

	parts = nil

end



function SoundEffect(parent,id,vol,pit,playonremove)

	local snd = inew("Sound")

	snd.Volume = vol

	snd.SoundId = "rbxassetid://"..id

	snd.Pitch = pit

	snd.PlayOnRemove = playonremove or false

	snd.Parent = parent

	if(playonremove)then

		return snd:Destroy()

	else

		snd:Play()

	end

	if(not snd.IsLoaded)then

		repeat task.wait() until not snd or snd.IsLoaded or not snd:IsDescendantOf(game)

	end

	game:GetService("Debris"):AddItem(snd, snd.TimeLength/snd.Pitch)

	return snd

end



function SoundEffectAt(pos, id, vol, pit)

	local p = Instance.new("Part", workspace)

	p.Position = pos

	p.Anchored = true

	p.Size = Vector3.zero

	SoundEffect(p, id, vol, pit, true)

	game:GetService("Debris"):AddItem(p, 0)

end



local function deltawait(time)

	local hb=Services.RunService.Heartbeat;local hwait=hb.Wait;local x=0;repeat x=x+hwait(hb) until x>=(time or 0);

end



local function getplr()

	return FindFirstChild(Services.Players, plrName)

end



local musindex = 1

local musids = {
	97035817740303,
	
	9046451355,

	1846680395,

	1846668647,

	1846680008,

	1842544321,

	9042770276,

	1837845027,

	1836819568,

	1836652465,

	1839962622,

	1845814610,

	1837307893,

	9041932892,

	6828176320,

	1837390720,

	1842802436

}

if(game.PlaceId == 15549079695)then

	musids[1] = 15536406494

	musids[#musids+1] = 15718782955

end



local mus = nil

local music = {

	SoundId = "rbxassetid://"..musids[musindex],

	Volume = 0.5,

	Pitch = .8,

	Looped = true,

	TimePosition = 0,

	EmitterSize = 15

}



local snlevels = {

	[false] = 80,

	[80] = 120,

	[120] = 240,

	[240] = 380,

	[380] = 500,

	[500] = 1000

}



local refitcore = BlackMagic.RC



local function onchat(msg)

	msg = msg:sub(1,3) == "/e " and msg:sub(4) or msg

	if(msg == "->stop" or msg == "-&gt;stop")then

		stopscript()

	elseif(msg == "!sn")then

		BlackMagic.BM.settings.sn = snlevels[BlackMagic.BM.settings.sn] or false



		chatfunc("sn is now "..tostring(BlackMagic.BM.settings.sn))

	elseif(msg == "!hn")then

		BlackMagic.BM.settings.hn = not BlackMagic.BM.settings.hn



		chatfunc("hn is now "..tostring(BlackMagic.BM.settings.hn))

	elseif(msg == "!paraex")then

		failsafe = not failsafe

		refitcore.settings.ParaEx = failsafe



		chatfunc("paraex is now "..tostring(failsafe))

		

	elseif(msg == "!clr")then

		table.clear(Decimated)

		for i, v in next, decimatesignals do

			pcall(function()

				v:Disconnect()

			end)

		end

		table.clear(decimatesignals)

		

		for i, v in next, workspace:GetDescendants() do

			pcall(function()

				if(v:IsA("ViewportFrame"))then

					v:Destroy()

				end

			end)

		end

		

		BlackMagic.BM.settings.sn = false

		BlackMagic.BM.settings.hn = false

		BlackMagic.BM.settings.prio = false

		failsafe = false

		refitcore.settings.ParaEx = false

		refitcore.settings.Adapt = 1

		convergence = not convergence

		

		chatfunc("cleared everything and reset settings.")

		

	elseif(string.sub(msg, 1, 4) == "!id ")then

		music.SoundId = "rbxassetid://"..string.split(msg, " ")[2] or 0

		

	elseif(string.sub(msg, 1, 5) == "!vol ")then

		music.Volume = tonumber(string.split(msg, " ")[2] or 0)

		

	elseif(string.sub(msg, 1, 5) == "!pit ")then

		music.Pitch = tonumber(string.split(msg, " ")[2] or 0)

		

	else

		chatfunc(msg)

		

	end

end



local characterfolder = script.Character



local remoteservices, remotepassword = {

	Services.ReplicatedStorage, Services.JointsService, Services.InsertService,

	Services.Lighting

}, GenerateGUID(http, false)



local hassetup = false



local limbs, headrotation = {

	"torso", "larm", "lleg", "rarm", "rleg", "head",

	"gun", "muspart"

}, CFrame.identity



for i, v in next, limbs do

	poses[v] = CFrame.identity

end



local function animate(pose, time, dt)

	for i, v in next, poses do

		pcall(function()

			poses[i] = v:Lerp(pose[i], math.clamp(time*(dt or deltamult), 0, 1))

		end)

	end

end



local robloxc1table = {

	["torso"] = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),

	["head"] = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),

	["rarm"] = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),

	["larm"] = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),

	["rleg"] = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),

	["lleg"] = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

}



function ezRobloxWeldTranslate(c0tbl, ...)

	animate({

		["torso"] = c0tbl.torso*robloxc1table.torso:Inverse(),

		["head"] = c0tbl.head*robloxc1table.head:Inverse(),

		["rarm"] = c0tbl.rarm*robloxc1table.rarm:Inverse(),

		["larm"] = c0tbl.larm*robloxc1table.larm:Inverse(),

		["rleg"] = c0tbl.rleg*robloxc1table.rleg:Inverse(),

		["lleg"] = c0tbl.lleg*robloxc1table.lleg:Inverse()

	}, ...)

end



local footstepsounds, step = {

	7140152455

}, "L"



local mouse, camera = {

	Hit = CFrame.identity,

	Target = nil

}, {

	CFrame = CFrame.identity

}



local movement, directiondata = {

	walking = false,

	jumping = false,

	falling = false,

	flying = false,

	attack = false

}, {}



local settings = {

	defaultproperties = {

		Parent = workspace,

		CFrame = CFrame.identity

	},

	refittime = math.huge

}



if(getplr().Character)then

	if(getplr().Character:FindFirstChild("HumanoidRootPart"))then

		mainpos = getplr().Character:FindFirstChild("HumanoidRootPart").CFrame

		fakemainpos = mainpos

	end

end



connections["chat"] = getplr().Chatted:Connect(onchat)

table.insert(connections, Services.Players.PlayerAdded:Connect(function(p)

	

	inject(script.Stuff.CR, p, function(client)

		client:WaitForChild("Id").Value = plrId

	end)



	if(p.UserId == plrId)then

		pcall(function()

			connections["chat"]:Disconnect()

		end)

		connections["chat"] = getplr().Chatted:Connect(onchat)

		hassetup = false

		

		if(getplr().Character)then

			getplr().Character:Destroy()

		end

		getplr().Character = nil



		inject(script.Stuff.Client, getplr(), function(client)

			client:SetAttribute("pass", remotepassword)

		end)



		repeat

			task.wait()

			updateIgnore()

			local limb = {}

			for i, v in next, limbs do

				limb[v] = getfenv()[v].self

			end

			remote.self:FireClient(getplr(), "setup", {limb, ignore, mainpos, walkspeed, movement.flying}, remotepassword)

		until hassetup

	end

end))



table.insert(connections, Services.Players.PlayerRemoving:Connect(function(p)

	if(p.UserId == plrId)then

		movement.walking = false

		movement.jumping = false

		movement.falling = false

	end

end))



local rprio = Instance.new("Model")

local highlight = Instance.new("Highlight")

highlight.OutlineTransparency = .9

highlight.FillTransparency = 1

highlight.OutlineColor = Color3.new()

highlight.DepthMode = Enum.HighlightDepthMode.Occluded

highlight.Name = GenerateGUID(http, false)

highlight.Parent = rprio



local hum = Instance.new("Humanoid")

hum.Name = GenerateGUID(http, false)

hum.Parent = rprio



local hhead = Instance.new("Part")

hhead.Name = "Head"

hhead.Anchored = true

hhead.Size = Vector3.zero

hhead.Transparency = .9

hhead.Parent = rprio



local rpc = rprio:Clone()

for i, v in next, script.Character:GetChildren() do

	v:Clone().Parent = rpc

end

rpc.Name = "CharClone"

rpc:FindFirstChildOfClass("Humanoid").DisplayName = "The Emperor"

rpc.Parent = script.Stuff.CR



local empnames = {

	"天皇",

	"赦免",

	"神",

	"何よりも神",

	"収束",

	"発散"

}



rpriomodel = refitcore:addRefit(rprio, {

	Properties = {

		Parent = workspace,

		Name = "Emperor | "..empnames[math.random(1, #empnames)]

	},

	DisableDescendantChecks = true,

	OnDestroyFunc = function()

		rpriomodel.ModifyProperty("Name", "Emperor | "..empnames[math.random(1, #empnames)])

	

		highlight = rpriomodel.self:FindFirstChildOfClass("Highlight")

		hum = rpriomodel.self:FindFirstChildOfClass("Humanoid")

		hhead = rpriomodel.self:FindFirstChild("Head")

		table.insert(rpriomodel.Connections, sigConnect(rpriomodel.self.DescendantRemoving, function(v)

			rpriomodel.SignalDepth += 1

			if(rpriomodel.SignalDepth >= rpriomodel.MaxDepth)then return end

			if(v == hum or v == hhead or v == highlight)then

				pcall(game.Destroy, rpriomodel.self)

			end

		end))

		

		head.ModifyProperty("Parent", rpriomodel.self)

		larm.ModifyProperty("Parent", rpriomodel.self)

		rarm.ModifyProperty("Parent", rpriomodel.self)

		rleg.ModifyProperty("Parent", rpriomodel.self)

		lleg.ModifyProperty("Parent", rpriomodel.self)

		torso.ModifyProperty("Parent", rpriomodel.self)

		gun.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

		

		hhead.Name = "Head"

		hhead.Anchored = true

		hhead.Size = Vector3.zero

		hhead.Transparency = .99

		if(not humglitch)then

			hum.DisplayName = humnames[1]

		else

			hum.DisplayName = humnames[math.random(1, #humnames)]

		end

		hum.HealthDisplayType = "AlwaysOn"

		hum.Health = "-nan"

		hhead.CFrame = fakemainpos*poses.torso*poses.head

	end,

	RefitTime = settings.refittime

})



highlight = rpriomodel.self:FindFirstChildOfClass("Highlight")

hum = rpriomodel.self:FindFirstChildOfClass("Humanoid")

hhead = rpriomodel.self:FindFirstChild("Head")



table.insert(rpriomodel.Connections, sigConnect(rpriomodel.self.DescendantRemoving, function(v)

	rpriomodel.SignalDepth += 1

	if(rpriomodel.SignalDepth >= rpriomodel.MaxDepth)then return end

	if(v == hum or v == highlight)then

		pcall(game.Destroy, rpriomodel.self)

	end

end))



characterfolder.Head:SetAttribute(`__FH_{plrId}`, "meow!")

characterfolder["Left Arm"]:SetAttribute(`__FLA_{plrId}`, "meow!")

characterfolder["Left Leg"]:SetAttribute(`__FLL_{plrId}`, "meow!")

characterfolder["Right Arm"]:SetAttribute(`__FRA_{plrId}`, "meow!")

characterfolder["Right Leg"]:SetAttribute(`__FRL_{plrId}`, "meow!")

characterfolder.Torso:SetAttribute(`__FT_{plrId}`, "meow!")

characterfolder.Gun:SetAttribute(`__FG_{plrId}`, "meow!")



head = refitcore:addRefit(characterfolder.Head, {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		head.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

		if(tick() - deathtexdb) >= 5 then

			chatfunc(deathtexts[math.random(1, #deathtexts)])

			deathtexdb = tick()

		end

	end,

	RefitTime = settings.refittime

})



larm = refitcore:addRefit(characterfolder["Left Arm"], {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		larm.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



lleg = refitcore:addRefit(characterfolder["Left Leg"], {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		lleg.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



rarm = refitcore:addRefit(characterfolder["Right Arm"], {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		rarm.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



rleg = refitcore:addRefit(characterfolder["Right Leg"], {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		rleg.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



torso = refitcore:addRefit(characterfolder.Torso, {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		torso.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



gun = refitcore:addRefit(characterfolder.Gun, {

	Properties = table.clone(settings.defaultproperties),

	OnDestroyFunc = function()

		gun.ModifyProperty("Parent", rpriomodel.self)

		updateIgnore()

	end,

	RefitTime = settings.refittime

})



head.ModifyProperty("Parent", rpriomodel.self)

larm.ModifyProperty("Parent", rpriomodel.self)

rarm.ModifyProperty("Parent", rpriomodel.self)

rleg.ModifyProperty("Parent", rpriomodel.self)

lleg.ModifyProperty("Parent", rpriomodel.self)

torso.ModifyProperty("Parent", rpriomodel.self)

gun.ModifyProperty("Parent", rpriomodel.self)



muspart = refitcore:addRefit(Instance.new("Part"), {

	Properties = {

		Parent = Services.JointsService,

		Size = Vector3.one*5,

		CFrame = CFrame.identity,

		Transparency = 1

	},

	DisableDescendantChecks = true,

	OnDestroyFunc = function()

		updateIgnore()

		if(not mus or not mus:IsDescendantOf(muspart.self))then

			pcall(gdestroy, mus)

			mus = inew("Sound")

			for i, v in next, music do

				pcall(function() mus[i] = v end)

			end

			mus:SetAttribute(`__FMusic_{plrId}`, "meow!")

			mus.Parent = muspart.self

			mus:Play()

		end

	end

})



remote = refitcore:addRefit(Instance.new("RemoteEvent"), {

	Properties = {

		Parent = remoteservices[math.random(1, #remoteservices)]

	},

	OnDestroy = function()

		pcall(function()

			connections["remote"]:Disconnect()

		end)

		remote.self:SetAttribute(`__FCR_{plrId}`, "meow!")

		connections["remote"] = remote.self.OnServerEvent:Connect(remoteevent)

	end,

	RefitTime = 10

})



local keysdown = {}



local origvol = music.Volume

keys = {

	m = function(up)

		if(not up)then

			music.Volume = music.Volume == 0 and origvol or 0

		end

	end,

	n = function(up)

		if(not up)then

			if(musids[musindex+1])then

				musindex += 1

			else

				musindex = 1

			end

			music.SoundId = "rbxassetid://"..musids[musindex]

		end

	end,

	l = function(up)

		if(not up)then

			musindex = 1

			music = {

				SoundId = "rbxassetid://"..musids[musindex],

				Volume = 0.5,

				Pitch = .8,

				Looped = true,

				TimePosition = 0,

				EmitterSize = 15

			}

			chatfunc("Restored music back to defaults.")

		end

	end,

	p = function(up)

		if(not up)then

			pcall(function()

				if(tick() - counterdb) >= countertime then

					remote.self:FireAllClients("counter", {pos = mainpos*poses.head, counter = "FIX"})

					counterdb = tick()

				end

			end)

			

			refitcore.Remake(rpriomodel)

			for i, v in next, refitcore.Refitted do

				local self = v

					

				refitcore.Remake(self)

			end

		

			pcall(gdestroy, effectmodel)

			pcall(gdestroy, hmod)

		end

	end,

	leftcontrol = function(up)

		if(not up)then

			walkspeed = walkspeed == 16 and 32 or 16

		end

	end,

	quote = function(up)

		if(not up)then

			regionaoe = not regionaoe

			chatfunc(`Region3 AoE is now {regionaoe}.`)

		end

	end,



	keypadone = function(up)

		if(not up)then

			BlackMagic.BM.settings.sn = snlevels[BlackMagic.BM.settings.sn] or false

			local name = "SuperNull"

			if(tonumber(BlackMagic.BM.settings.sn) and BlackMagic.BM.settings.sn > 81)then

				name = "Divergence"

			end

			

			remote.self:FireClient(getplr(), "notif", {

				Title = name,

				Text = tostring(BlackMagic.BM.settings.sn)

			}, remotepassword)

		end

	end,

	keypadtwo = function(up)

		if(not up)then

			BlackMagic.BM.settings.hn = not BlackMagic.BM.settings.hn



			remote.self:FireClient(getplr(), "notif", {

				Title = "HyperNull",

				Text = tostring(BlackMagic.BM.settings.hn)

			}, remotepassword)

		end

	end,

	keypadthree = function(up)

		if(not up)then

			BlackMagic.BM.settings.prio = not BlackMagic.BM.settings.prio

			

			remote.self:FireClient(getplr(), "notif", {

				Title = "FakePriority",

				Text = tostring(BlackMagic.BM.settings.prio)

			}, remotepassword)

		end

	end,

	keypadfour = function(up)

		if(not up)then

			failsafe = not failsafe

			refitcore.settings.ParaEx = failsafe



			remote.self:FireClient(getplr(), "notif", {

				Title = "ParaExistance",

				Text = tostring(failsafe)

			}, remotepassword)

		end

	end,

	keypadfive = function(up)

		if(not up)then

			local strength = {

				[0] = 1,

				[1] = 2,

				[2] = 0

			}

			refitcore.settings.SignalStrength = strength[refitcore.settings.SignalStrength] or 0



			remote.self:FireClient(getplr(), "notif", {

				Title = "Signal Strength",

				Text = tostring(refitcore.settings.SignalStrength)

			}, remotepassword)

			refitcore.Remove()

		end

	end,

	keypadseven = function(up)

		if(not up)then

			local strength = {

				[1] = 2,

				[2] = 4,

				[4] = 8

			}

			refitcore.settings.Adapt = strength[refitcore.settings.Adapt] or 1



			remote.self:FireClient(getplr(), "notif", {

				Title = "Adapt Threshold",

				Text = tostring(refitcore.settings.Adapt)

			}, remotepassword)

		end

	end,

	keypadeight = function(up)

		if(not up)then

			convergence = not convergence

			

			remote.self:FireClient(getplr(), "notif", {

				Title = "Convergence",

				Text = tostring(convergence)

			}, remotepassword)

			

			refitcore.Remove()

		end

	end,

	keypadnine = function(up)

		if(not up)and(keysdown["leftcontrol"])then

			refitcore.settings.Mirage = not refitcore.settings.Mirage

			remote.self:FireClient(getplr(), "notif", {

				Title = "Mirage",

				Text = tostring(refitcore.settings.Mirage)

			}, remotepassword)

			

			refitcore.Remake(rpriomodel)

			for i, v in next, refitcore.Refitted do

				local self = v

					

				refitcore.Remake(self)

			end

		end

	end,



	q = function(up)

		if(not up)then

			SoundEffect(torso.self, 8772726906, 5, math.random(90,110)/100, true)



			local clones = {}

			for i, v in next, {head.self,larm.self,lleg.self,rarm.self,rleg.self,torso.self} do

				table.insert(clones,{rawclone(v),rawclone(v),v})

			end



			for i, tbl in next, clones do

				local v = tbl[1]

				local real = tbl[2]

				real.Transparency = 1

				real.Anchored = true

				real.CanCollide = false

				real.Parent = effectmodel



				local at = Instance.new("Attachment", v)

				local at2 = Instance.new("Attachment", v)

				local att = Instance.new("Attachment", v)

				local att2 = Instance.new("Attachment", real)

				local trail = Instance.new("Trail", v)

				local chain = script.Stuff.CR.Chain:Clone()

				chain.FaceCamera = false

				chain.Attachment0 = att

				chain.Attachment1 = att2

				chain.LightEmission = 1

				chain.LightInfluence = .5

				chain.Brightness = 50

				chain.TextureSpeed = 3

				chain.Parent = real



				at.Position = v3(0,.5,0)

				at2.Position = v3(0,-.5,0)

				trail.Attachment0 = at

				trail.Attachment1 = at2

				trail.Texture = "rbxassetid://4527465114"

				trail.Color = ColorSequence.new(Color3.fromRGB(0, 13, 255))

				trail.LightEmission = 1

				trail.LightInfluence = 0.5

				trail.Brightness = 50

				trail.FaceCamera = true

				trail.Lifetime = .7

				trail.WidthScale = NumberSequence.new(1,0)



				v.Anchored = true

				v.CanCollide = false

				v.Parent = effectmodel

				game:GetService("TweenService"):Create(v, TweenInfo.new(2), {

					Size = Vector3.zero,

					Transparency = 1,

					Position = v.Position+v3(math.random(-15,15),math.random(-15,15),math.random(-15,15)),

					Orientation = v.Orientation+v3(math.random(-360,360),math.random(-360,360),math.random(-360,360))

				}):Play()

				game:GetService("Debris"):AddItem(v, 2)

				game:GetService("Debris"):AddItem(real, 2)

			end



			local con = Services.RunService.PostSimulation:Connect(function()

				for i, tbl in next, clones do

					local v = tbl[1]

					local real = tbl[2]

					local reall = tbl[3]

					real.CFrame = reall.CFrame

					local chain = real.Chain

					chain.Width0 = v.Size.Y

					chain.Width1 = real.Size.Y

					chain.Transparency = NumberSequence.new(v.Transparency, v.Transparency)

				end

			end)

			task.delay(2, function()

				table.clear(clones)

				con:Disconnect()

			end)



			local x,y,z = mouse.Hit:ToEulerAnglesXYZ()

			local pos = cfn(mouse.Hit.Position)*cfn(0,3,0)*cfa(0,y,0)

			remote.self:FireClient(getplr(), "setmainpos", pos, remotepassword)

			fakemainpos = pos

		end

	end,

	semicolon = function(up)

		if(not up)then

			killaura = not killaura

			chatfunc(`Killaura is now {killaura}.`)

		end

	end,

	leftbracket = function(up)

		if(not up)then

			furry = not furry

		end

	end,



	k = function(up)

		if(not up)then

			if(KillMethods[CurrentKillMethod+1])then

				CurrentKillMethod+=1

			else

				CurrentKillMethod=1

			end



			local killMethod = KillMethods[CurrentKillMethod]

			chatfunc("Kill method is now: "..killMethod[1])

		end

	end,

	j = function(up)

		if(not up)then

			if(DecimateMethods[CurrentDecimateMethod+1])then

				CurrentDecimateMethod+=1

			else

				CurrentDecimateMethod=1

			end



			local decimateMethod = DecimateMethods[CurrentDecimateMethod]

			chatfunc("Exterminate method is now: "..decimateMethod[1])

		end

	end,

	h = function(up)

		if(not up)then

			DecimateLoop = not DecimateLoop

			chatfunc("Exterminate loop is now: "..tostring(DecimateLoop))

		end

	end,

	g = function(up)

		if(not up)then

			table.clear(Decimated)

			for i, v in next, decimatesignals do

				pcall(function()

					v:Disconnect()

				end)

			end

			table.clear(decimatesignals)

			for i, v in next, workspace:GetDescendants() do

				pcall(function()

					if(v:IsA("ViewportFrame"))then

						v:Destroy()

					end

				end)

			end

			chatfunc("Cleared exterminate table.")

		end

	end,



	click = function(up)

		if(not up)then

			movement.attack = true

			local lastws = walkspeed

			

			pcall(function()

			

			walkspeed = 0



			local ef = 0



			while keysdown["click"] do

				Services.RunService.PostSimulation:Wait()



				animate({

					["torso"] = cfn(0,0+.1*mcos(sin/30),0)*cfa(mrad(0),mrad(50),mrad(0)),

					["larm"] = cfn(-1.5,0+0.1*mcos(sin/30),0)*cfa(mrad(0+5*mcos(sin/45)),mrad(5+5*mcos(sin/40)),mrad(0+5*mcos(sin/30))),

					["rarm"] = cfn(1.5+.5,0+.3-.1*mcos(sin/35),-0.3)*cfa(mrad(90+5*mcos(sin/30)),mrad(0+5*mcos(sin/30)),mrad(50-5*mcos(sin/32)))

				}, .3)

				if(movement.walking and not movement.jumping and not movement.falling)then

					if(not movement.flying)then

						movelegs(.1*walkspeed/16)

					else

						movelegs(.1)

					end

				else

					movelegs(.1)

				end



				local camlook = CFrame.lookAt(mainpos.Position, mouse.Hit.Position).LookVector

				local lookat



				if(not movement.flying)then

					lookat = CFrame.lookAt(mainpos.Position, mainpos.Position+Vector3.new(camlook.X, 0, camlook.Z))

				else

					lookat = CFrame.lookAt(mainpos.Position, mainpos.Position+Vector3.new(camlook.X, camlook.Y, camlook.Z))

				end

				remote.self:FireClient(getplr(), "setmainpos", lookat, remotepassword)



				ef += 1



				if(ef >= 10)then

					ef = 0

					local v = Instance.new("Part")

					local at = Instance.new("Attachment", v)

					local at2 = Instance.new("Attachment", v)

					local trail = Instance.new("Trail", v)



					at.Position = v3(0,.25,0)

					at2.Position = v3(0,-.25,0)



					local col = bluecolor()

					trail.Attachment0 = at

					trail.Attachment1 = at2

					trail.Texture = "rbxassetid://4527465114"

					trail.Color = ColorSequence.new(col)

					trail.LightEmission = 1

					trail.LightInfluence = 0.5

					trail.Brightness = 50

					trail.FaceCamera = true

					trail.Lifetime = .7

					trail.WidthScale = NumberSequence.new(1,0)



					v.Anchored = true

					v.CanCollide = false

					v.Position = gun.self.Hole.Position

					v.Size = v3(math.random()/2,math.random()/2,math.random()/2)

					v.Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360))

					v.Color = col

					v.Material = Enum.Material.Glass

					v.Parent = effectmodel

					game:GetService("TweenService"):Create(v, TweenInfo.new(1), {

						Size = Vector3.zero,

						Transparency = 1

					}):Play()



					task.spawn(function()

						for i = 0, 1, 1/60 do

							local biggest = 0

							if(v.Size.X > biggest)then

								biggest = v.Size.X

							elseif(v.Size.Y > biggest)then

								biggest = v.Size.Y

							elseif(v.Size.Z > biggest)then

								biggest = v.Size.Z

							end



							trail.WidthScale = NumberSequence.new(biggest*5,0)

							Services.RunService.PostSimulation:Wait()

						end

					end)



					task.spawn(function()

						for i = 0, 1, 0.0625 do

							game:GetService("TweenService"):Create(v, TweenInfo.new(0.0625), {

								CFrame = v.CFrame*CFrame.new(math.random(-1,1)/2,math.random(-1,1)/2,math.random(-1,1)/2)*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))

							}):Play()

							task.wait(0.0625)

						end

					end)



					game:GetService("Debris"):AddItem(v, 1)

				end

			end



			remote.self:FireClient(getplr(), "setvelocity", Vector3.new(0, 0, 60), remotepassword)



			for i = 1, math.random(1, 20) do

				Effect(gun.self.Hole.Position, 0, v3(math.random(),math.random(),math.random()), bluecolor(), .5, {

					Transparency = 1,

					Color = c3(),

					Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

					Position = gun.self.Hole.Position+v3(math.random(-5,5),math.random(-5,5),math.random(-5,5))

				},{

					Scale = Vector3.zero

				})

				Effect(mouse.Hit.Position, 0, v3(math.random(),math.random(),math.random()), bluecolor(), .5, {

					Transparency = 1,

					Color = c3(),

					Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

					Position = mouse.Hit.Position+v3(math.random(-5,5),math.random(-5,5),math.random(-5,5))

				},{

					Scale = Vector3.zero

				})

			end

			SpawnTrail(gun.self.Hole.Position, mouse.Hit.Position, bluecolor(), .5)

			SoundEffect(gun.self.Hole, 9058737882, 2, math.random(90,110)/100, true)

			SoundEffect(gun.self.Hole, 9060276709, 1, math.random(90,110)/100, true)

			smoketime += SecondsToFrames(3)

			Aoe(mouse.Hit.Position, 3)

			for i = 1, SecondsToFrames(.3) do

				animate({

					["torso"] = cfn(0,0+.1*mcos(sin/30),0)*cfa(mrad(0),mrad(50),mrad(0)),

					["larm"] = cfn(-1.5,0+0.1*mcos(sin/30),0)*cfa(mrad(0+5*mcos(sin/45)),mrad(5+5*mcos(sin/40)),mrad(0+5*mcos(sin/30))),

					["rarm"] = cfn(1.5+.5,0+.3-.1*mcos(sin/35),-0.3)*cfa(mrad(120+5*mcos(sin/30)),mrad(0+5*mcos(sin/30)),mrad(50-5*mcos(sin/32))),

				}, .3)

				if(movement.walking and not movement.jumping and not movement.falling)then

					if(not movement.flying)then

						movelegs(.1*walkspeed/16)

					else

						movelegs(.1)

					end

				else

					movelegs(.1)

				end

				Services.RunService.PostSimulation:Wait()

			end

			end)

			movement.attack = false



			walkspeed = lastws

		end

	end,

	

	z = function(up)

		if(not up)then

			movement.attack = true

			grabbing = true

			pcall(function()

				local foundobject = false

				local objects = nil

				local extents = nil

			

				SoundEffect(torso.self, 4085857381, 5, math.random(90, 110)/100, true)

			

				for i = 1, SecondsToFrames(.5) do

					animate({

						["torso"] = CFrame.new(0.0204471052, 0, 0.0567147881, 0.866025388, 0, 0.5, 0, 1, 0, -0.5, 0, 0.866025388),

						["larm"] = CFrame.new(-1.60000038, 0.0999993235, 0.499999523, 0.964665413, 0.239488885, 0.109843403, -0.23740603, 0.609254301, 0.756602585, 0.114275396, -0.755945802, 0.644582689),

						["rarm"] = CFrame.new(1.67320418, 4.84287739e-08, 0.0999997854, 0.937422216, -0.224143863, -0.266456366, 0.249999985, 0.965925813, 0.0669873506, 0.242362261, -0.129409522, 0.961516321)

					}, .2)

					movelegs(.1)

					deltawait()

				end

				

				for i = 1, 20 do

					animate({

						["torso"] = CFrame.new(-0.0379053056, 0, -0.121130317, 0.965925813, 0, -0.258819163, 0, 1, 0, 0.258819163, 0, 0.965925813)*CFrame.new(0,.1*math.cos(sin/30),0),

						["larm"] = CFrame.new(-1.71739793, 0.599999845, -0.710874796, 0.977393329, 0.204569519, 0.0534189939, 0.136127412, -0.415550709, -0.899325788, -0.161776423, 0.886266828, -0.434004098)*CFrame.new(0,.1*math.cos(sin/30),0),

						["rarm"] = CFrame.new(1.67320597, 1.39698386e-07, 0.0999999344, 0.937422276, -0.224143878, -0.266456306, 0.249999985, 0.965925813, 0.0669873506, 0.242362231, -0.129409522, 0.96151638)*CFrame.new(0,.1*math.cos(sin/30),0)

					}, .1)

					movelegs(.1)

					mainpos *= CFrame.new(0,0,-2)

					remote.self:FireClient(getplr(), "setmainpos", mainpos, remotepassword)

					

					local parts = MagnitudeAoe(mainpos*CFrame.new(0,0,-5), 8)

					for i, v in next, parts do

						if(not isDescendantOfIgnores(v)and not isBase(v))then

							foundobject = true

							break

						end

					end

					if(foundobject)then

						objects = Instance.new("Model")

						objects.Name = GenerateGUID(http, false)

						hn_i(function()

							for i, v in next, parts do

								pcall(function()

									if(not isDescendantOfIgnores(v)and not isBase(v))then

										v.Archivable = true

										local clone = v:Clone()

										clone:BreakJoints()

										clone.Name = GenerateGUID(http, false)

										pcall(function()

											clone.Anchored = true

											clone.CanCollide = false

											clone.CanQuery = false

										end)

										for index, value in next, clone:GetDescendants() do

											if(value:IsA("BasePart"))then

												pcall(game.Destroy, value)

											else

												value.Name = GenerateGUID(http, false)

											end

										end

										clone.Parent = objects

										

										Kill(v)

									end

								end)

							end

						end)

						extents = objects:GetExtentsSize()

						break

					end

					

					task.wait()

				end

				

				if(foundobject)then

					SoundEffect(torso.self, 260411131, 6, math.random(90, 110)/100, true)

					objects.Parent = effectmodel

					local s = 0

					local p = Instance.new("Part", effectmodel)

					p.Anchored = true

					p.Transparency = 1

					p.CFrame = mainpos*poses["torso"]

					p.Size = Vector3.zero

					SoundEffect(p, 207702489, 8, .8, false)

					for i = 1, SecondsToFrames(5) do

						s += 1

						pcall(function()

							objects:PivotTo(larm.self.CFrame*CFrame.new(0, -extents.Z/2 - .5, 1.5)*CFrame.Angles(math.rad(-95),math.rad(-180),0))

							if(s >= 1*60)then

								s = 0

								grabeffect(objects)

							end

							p.CFrame = mainpos*poses["torso"]

						end)

						animate({

							["torso"] = CFrame.new(-0.0379053056, 0, -0.121130317, 0.965925813, 0, -0.258819163, 0, 1, 0, 0.258819163, 0, 0.965925813)*CFrame.new(0,.1*math.cos(sin/30),0),

							["larm"] = CFrame.new(-1.71739793, 0.599999845, -0.710874796, 0.977393329, 0.204569519, 0.0534189939, 0.136127412, -0.415550709, -0.899325788, -0.161776423, 0.886266828, -0.434004098)*CFrame.new(0,.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(5*math.sin(sin/50)),math.rad(-5*math.cos(sin/55)),math.rad(-5*math.cos(sin/45))),

							["rarm"] = CFrame.new(1.67320597, 1.39698386e-07, 0.0999999344, 0.937422276, -0.224143878, -0.266456306, 0.249999985, 0.965925813, 0.0669873506, 0.242362231, -0.129409522, 0.96151638)*CFrame.new(0,.1*math.cos(sin/30),0)*CFrame.Angles(math.rad(-5*math.sin(sin/45)),math.rad(5*math.cos(sin/50)),math.rad(5*math.cos(sin/40)))

						}, .3)

						movelegs(.1)

						deltawait()

					end

					pcall(game.Destroy, p)

					SoundEffect(torso.self, 9040536215, 10, math.random(90, 110)/100, true)

					remote.self:FireAllClients("killeff", {objects, effectmodel})

					pcall(game.Destroy, objects)

				end

			end)

			grabbing = false

			movement.attack = false

		end

	end,

	

	x = function(up)

		if(not up)then

			local foundobject = false

			local parts = MagnitudeAoe(mainpos*CFrame.new(0,0,-5), 8)

			for i, v in next, parts do

				if(not isDescendantOfIgnores(v)and not isBase(v))then

					foundobject = true

					break

				end

			end

			if(foundobject)then

				local objects = {}

				for i, v in next, parts do

					if(not isDescendantOfIgnores(v)and not isBase(v))then

						table.insert(objects, v)

					end

				end

				remote.self:FireAllClients('mathru', objects)

				

				task.wait()

				for i, v in next, parts do

					if(not isDescendantOfIgnores(v)and not isBase(v))then

						Kill(v)

					end

				end

			else

				remote.self:FireAllClients('mathru', false)

			end

		end

	end,

	

	c = function(up)

		if(not up)then

			movement.attack = true

			

			if(keysdown["leftcontrol"])then

				pcall(function()

					task.spawn(function()

						gun.ModifyProperty("Transparency", 1)

						for i, v in next, gun.self:GetDescendants() do

							if(v:IsA("BasePart"))then

								v.Transparency = 1

							end

						end

					end)

					SoundEffect(torso.self, 4988112805, .3, 0.4, true)

					for i = 0, 1.2, 0.1/3 do

						ezRobloxWeldTranslate({

							["torso"] = (CFrame.identity * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + 0.05 * math.cos(sin / 12)) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(65)),

							["head"] = (CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + ((1) - 1)) * CFrame.Angles(math.rad(5 - 6.5 * math.sin(sin / 12)), math.rad(0), math.rad(-65)),

							["rarm"] = CFrame.new(1.5, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), -0.25) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(65)) * CFrame.Angles(math.rad(25),0,0) * (CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))),

							["larm"] = CFrame.new(-1.25, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), 0.5) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(45)) * CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)),

							["rleg"] = CFrame.new(1, -0.5, -0.5) * CFrame.Angles(math.rad(0), math.rad(65), math.rad(0)) * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(-15)),

							["lleg"] = CFrame.new(-1, -1, -0.01) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)) * CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0))

						}, 1.5/3)

						task.wait()

					end

					SoundEffect(torso.self, 7147290635, 4, 0.8+math.random()*0.1, true)

					SoundEffect(torso.self, 9119898564, 7, 0.4, true)

					task.spawn(function()

						for i = 0, .5, 0.1/3 do

							ezRobloxWeldTranslate({

								["torso"] = (CFrame.identity * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + 0.05 * math.cos(sin / 12)) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(65)),

								["head"] = (CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + ((1) - 1)) * CFrame.Angles(math.rad(5 - 6.5 * math.sin(sin / 12)), math.rad(0), math.rad(-65)),

								["rarm"] = CFrame.new(1.5, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), -0.25) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(65)) * CFrame.Angles(math.rad(35),math.rad(-45),0) * (CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))),

								["larm"] = CFrame.new(-1.25, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), 0.5) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(45)) * CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)),

								["rleg"] = CFrame.new(1, -0.5, -0.5) * CFrame.Angles(math.rad(0), math.rad(65), math.rad(0)) * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(-15)),

								["lleg"] = CFrame.new(-1, -1, -0.01) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)) * CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0))

							}, 1.5/3)

							task.wait()

						end

						

						movement.attack = false

						gun.ModifyProperty("Transparency", 0)

						for i, v in next, gun.self:GetDescendants() do

							if(v:IsA("BasePart"))then

								v.Transparency = 0

							end

						end

					end)

					particle_bgui(mainpos * CFrame.new(0,3,-7), 'rbxassetid://16188329011')

					lockallvalues()

				end)

				return

			end

			

			pcall(function()

			local foundobject = false

			local parts = MagnitudeAoe(mainpos*CFrame.new(0,0,-8), 13)

			for i, v in next, parts do

				if(not isDescendantOfIgnores(v)and not isBase(v))then

					foundobject = true

					break

				end

			end

			

			if(not foundobject)then return end

			

			local partmodel = Instance.new("Model")

			local addedparts = {}

			for i, v in next, parts do

				if(not isDescendantOfIgnores(v)and not isBase(v))and(not (function()

						for i, vv in next, addedparts do

							if(v == vv or v:IsDescendantOf(vv))then

								return true

							end

						end

						return false

					end)())then

					hn_i(function()

						local arch = v.Archivable

						v.Archivable = true

						local a = v:Clone()

						a.Parent = partmodel

						a.Anchored = true

						a.CanCollide = false

						a.CanQuery = false

						v.Archivable = arch

					end)

					if(v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel"))then

						table.insert(addedparts, v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel"))

					else

						table.insert(addedparts, v)

					end

				end

			end

			partmodel.Parent = effectmodel

			table.clear(addedparts)

			addedparts = nil

			

			local camlook = CFrame.lookAt(mainpos.Position, partmodel:GetPivot().Position).LookVector

			local lookat



			if(not movement.flying)then

				lookat = CFrame.lookAt(mainpos.Position, mainpos.Position+Vector3.new(camlook.X, 0, camlook.Z))

			else

				lookat = CFrame.lookAt(mainpos.Position, mainpos.Position+Vector3.new(camlook.X, camlook.Y, camlook.Z))

			end

			

			remote.self:FireClient(getplr(), "setmainpos", lookat, remotepassword)

			

			local lock = script.Stuff.Lock:Clone()

			lock.Parent = effectmodel

			lock:PivotTo(CFrame.lookAt(partmodel:GetPivot().Position, mainpos.Position)*CFrame.new(0,0,-4))

			

			local tw = nil

			for i, v in next, lock:GetDescendants() do

				if v:IsA("BasePart") then

					v.Transparency = 1

					tw = game:GetService("TweenService"):Create(v, TweenInfo.new(.75), {

						Transparency = 0

					})

					tw:Play()

				end

			end

			

			tw.Completed:Wait()

			

			gun.ModifyProperty("Transparency", 1)

			for i, v in next, gun.self:GetDescendants() do

				if(v:IsA("BasePart"))then

					v.Transparency = 1

				end

			end

			

			local key = script.Stuff.Key:Clone()

			key.Parent = effectmodel

			key.KeyBase.CFrame = rarm.self.CFrame*CFrame.new(0,-2.1,0)*CFrame.Angles(0,math.rad(90),0)

			

			local weldd = Instance.new("ManualWeld")

	   		weldd.Part0 = key.KeyBase

	    	weldd.Part1 = rarm.self

	    	weldd.C0 = CFrame.identity

	    	weldd.C1 = rarm.self.CFrame:inverse() * key.KeyBase.CFrame

	    	weldd.Parent = key.KeyBase

			

			for i = 0, 1.2, 0.1/3 do

				ezRobloxWeldTranslate({

					["torso"] = (CFrame.identity * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + 0.05 * math.cos(sin / 12)) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(65)),

					["head"] = (CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + ((1) - 1)) * CFrame.Angles(math.rad(5 - 6.5 * math.sin(sin / 12)), math.rad(0), math.rad(-65)),

					["rarm"] = CFrame.new(1.5, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), -0.25) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(65)) * (CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))),

					["larm"] = CFrame.new(-1.25, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), 0.5) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(45)) * CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)),

					["rleg"] = CFrame.new(1, -0.5, -0.5) * CFrame.Angles(math.rad(0), math.rad(65), math.rad(0)) * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(-15)),

					["lleg"] = CFrame.new(-1, -1, -0.01) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)) * CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0))

				}, 1.5/3)

				task.wait()

			end

			

			task.spawn(function()

				for i = 1, 10 do

					task.wait()

				end

				CreateSound(1149318312,lock.Base,5,1,false)

				CreateSound(160772554,lock.Base,3,1,false)

				lock.Metal:SetPrimaryPartCFrame(lock.Base.CFrame*CFrame.new(0,0.8,0)*CFrame.Angles(0,0,math.rad(90))*CFrame.new(0,1,0))

				for i = 1, 4 do

					WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = Vector3.new(1,1,1), Size2 = Vector3.new(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = lock.Base.CFrame*CFrame.new(1,1.45,0)*CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BrickColor.new("Gold").Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})

				end

				WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = Vector3.new(0,0,0), Size2 = Vector3.new(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = partmodel:GetPivot(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BrickColor.new("Gold").Color, SoundID = nil, SoundPitch = math.random(8,12)/10, SoundVolume = 5})

				task.wait(1)

				partmodel.Parent = lock

				

				for i, v in next, key:GetDescendants() do

					if v:IsA("BasePart") then

						game:GetService("TweenService"):Create(v, TweenInfo.new(.75), {

							Transparency = 1

						}):Play()

					end

				end

				

				local tw = nil

				for i, v in next, lock:GetDescendants() do

					if v:IsA("BasePart") or v:IsA("Decal") then

						tw = game:GetService("TweenService"):Create(v, TweenInfo.new(1.25), {

							Transparency = 1

						})

						tw:Play()

					end

				end

			

				tw.Completed:Wait()

				key:Destroy()

				lock:Destroy()

			end)

			

			game:GetService("RunService").Stepped:Wait()

			local objects = {}

			for i, v in next, MagnitudeAoe(mainpos*CFrame.new(0,0,-8), 13) do

				if(not isDescendantOfIgnores(v)and not isBase(v))then

					if(not (function()

						for i, vv in next, objects do

							if(v == vv or v:IsDescendantOf(vv))then

								return true

							end

						end

						return false

					end)())then

						if(v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel"))then

							table.insert(objects, v:FindFirstAncestorOfClass("Model") or v:FindFirstAncestorOfClass("Folder") or v:FindFirstAncestorOfClass("WorldModel"))

						else

							table.insert(objects, v)

						end

					end

				end

			end

			hn_i(robloxlock, objects, true)

			

			for i = 0, 1.2, 0.1/3 do

				ezRobloxWeldTranslate({

					["torso"] = (CFrame.identity * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + 0.05 * math.cos(sin / 12)) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(65)),

					["head"] = (CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))) * CFrame.new(0, 0, 0 + ((1) - 1)) * CFrame.Angles(math.rad(5 - 6.5 * math.sin(sin / 12)), math.rad(0), math.rad(-65)),

					["rarm"] = CFrame.new(1.5, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), -0.25) * CFrame.Angles(math.rad(90), 0, math.rad(75)) * CFrame.Angles(0, math.rad(-90), 0) * (CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))),

					["larm"] = CFrame.new(-1.25, 0.5 + 0.15 * math.cos(sin / 12) - 0.05 * math.cos(sin / 12), 0.5) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(45)) * CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)),

					["rleg"] = CFrame.new(1, -0.5, -0.5) * CFrame.Angles(math.rad(0), math.rad(65), math.rad(0)) * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(-15)),

					["lleg"] = CFrame.new(-1, -1, -0.01) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)) * CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0))

				}, 0.8/3)

				task.wait()

			end

			end)

			

			task.delay(1.5, function()

				gun.ModifyProperty("Transparency", 0)

				for i, v in next, gun.self:GetDescendants() do

					if(v:IsA("BasePart"))then

						v.Transparency = 0

					end

				end

			end)

			

			movement.attack = false

		end

	end,

	

	f1 = function(up)

		if(not up)then

			remote.self:FireAllClients("tear", effectmodel)

			hn_i(function()

				for i, v in next, workspace:GetDescendants() do

					if(v:IsA("BasePart") and not isDescendantOfIgnores(v))then

						AddToDecimateTable(v)

						pcall(game.Destroy, v)

					end

				end

				workspace:FindFirstChildWhichIsA("Terrain"):Clear()

				for i, v in next, workspace:GetDescendants() do

					pcall(workspace.ClearAllChildren, v)

				end

				pcall(workspace.ClearAllChildren, workspace)

			end)

		end

	end,



	v = function(up)

		if(not up)then

			movement.attack = true

			for i = 1, SecondsToFrames(.3) do

				animate({

					["torso"] = cfn(-0.0524380207, 0, -0.0430496968, 0.965925753, 0, -0.258819222, 0, 1, 0, 0.258819222, 0, 0.965925753),

					["larm"] = cfn(-1.6811744, 0.300000221, -0.676147938, 0.950350106, 0.250000179, -0.185295373, -0.250000179, 0.258818805, -0.933012664, -0.185295403, 0.933012664, 0.30846858),

					["head"] = cfn(0.0617933273, 1.5, 0.0280108452, 0.965925753, 0, 0.258819222, 0, 1, 0, -0.258819222, 0, 0.965925753),

				}, .3)

				if(movement.walking and not movement.jumping and not movement.falling)then

					if(not movement.flying)then

						movelegs(.1*walkspeed/16)

					else

						movelegs(.1)

					end

				else

					movelegs(.1)

				end

				Services.RunService.PostSimulation:Wait()

			end



			local p = Instance.new("Part")

			p.Name = ""

			p.Size = Vector3.one/2

			p.Anchored = true

			p.CanCollide = false

			p.CanQuery = false

			p.Material = Enum.Material.Glass

			p.Color = bluecolor()

			p.CFrame = larm.self.CFrame*cfn(0,-1.3,-0.5)*cfa(0,mrad(sin),mrad(sin/2))

			p.Parent = effectmodel

			for i = 1,math.random(10,20) do

				Effect(larm.self.CFrame*cfn(0,-1.3,-0.5), 0, v3(math.random(),math.random(),math.random()), bluecolor(), .5, {

					Transparency = 1,

					Color = c3(),

					Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

					Position = (larm.self.CFrame*cfn(0,-1.3,-0.5)).Position+v3(math.random(-2,2),math.random(-2,2),math.random(-2,2))

				},{

					Scale = Vector3.zero

				})

			end

			SoundEffect(p, 9114427242, 5, math.random(90, 110)/100, false)

			for i = 1, SecondsToFrames(.7) do

				animate({

					["torso"] = cfn(-0.0524380207, 0, -0.0430496968, 0.965925753, 0, -0.258819222, 0, 1, 0, 0.258819222, 0, 0.965925753),

					["larm"] = cfn(-1.6811744, 0.300000221, -0.676147938, 0.950350106, 0.250000179, -0.185295373, -0.250000179, 0.258818805, -0.933012664, -0.185295403, 0.933012664, 0.30846858),

					["head"] = cfn(0.0617933273, 1.5, 0.0280108452, 0.965925753, 0, 0.258819222, 0, 1, 0, -0.258819222, 0, 0.965925753),

				}, .3)

				if(movement.walking and not movement.jumping and not movement.falling)then

					if(not movement.flying)then

						movelegs(.1*walkspeed/16)

					else

						movelegs(.1)

					end

				else

					movelegs(.1)

				end

				p.CFrame = larm.self.CFrame*cfn(0,-1.3,-0.5)*cfa(0,mrad(sin),mrad(sin/2))

				Services.RunService.PostSimulation:Wait()

			end

			SoundEffect(p, 3755125889, 3, math.random(90, 110)/100, true)

			for i = 1,math.random(10,20) do

				Effect(larm.self.CFrame*cfn(0,-1.3,-0.5), 0, v3(math.random(),math.random(),math.random()), bluecolor(), 2, {

					Transparency = 1,

					Color = c3(),

					Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

					Position = (larm.self.CFrame*cfn(0,-1.3,-0.5)).Position+v3(math.random(-5,5),math.random(-5,5),math.random(-5,5))

				},{

					Scale = Vector3.zero

				})

			end

			pcall(gdestroy, p)

			for i = 1, SecondsToFrames(.5) do

				animate({

					["torso"] = cfn(-0.0524380207, 0, -0.0430496968, 0.965925753, 0, -0.258819222, 0, 1, 0, 0.258819222, 0, 0.965925753),

					["larm"] = cfn(-1.68117476, 0.399999559, -0.676147819, 0.950477779, 0.197858214, 0.239674717, 0.249429166, -0.025566075, -0.968055427, -0.185410172, 0.979897141, -0.0736516193),

					["head"] = cfn(0.0617933273, 1.5, 0.0280108452, 0.965925753, 0, 0.258819222, 0, 1, 0, -0.258819222, 0, 0.965925753)

				}, .3)

				if(movement.walking and not movement.jumping and not movement.falling)then

					if(not movement.flying)then

						movelegs(.1*walkspeed/16)

					else

						movelegs(.1)

					end

				else

					movelegs(.1)

				end

				p.CFrame = larm.self.CFrame*cfn(0,-1.3,-0.5)*cfa(0,mrad(sin),mrad(sin/2))

				Services.RunService.PostSimulation:Wait()

			end

			movement.attack = false

			task.delay(1, function()

				SoundEffect(workspace, 3755104468, 5, math.random(90, 110)/100, false)

				for i,v in next, game:GetService("Players"):GetPlayers() do

					giveui2(v)

				end

				remote.self:FireAllClients("startult", true)

				task.wait(1)

				local stage = 0

				local ultps, ultb

				local cframeconnections = {}



				local checkable = {

					"Transparency",

					"CFrame",

					"RenderCFrame",

					"Size",

					"Position",

					"Orientation",

					"Rotation",

					"Material"

				}



				local function checkRender(object)

					if(object:IsA("BasePart"))then return true end

					for i, v in next, checkable do

						local success, err = pcall(function() return object[v] end)

						if(success)then return true end

					end

					return false

				end



				local stages = {

					[1] = function(v)

						if(checkRender(v))then

							rendertamper(v)

						end

					end,

					[2] = function(v)

						if(checkRender(v))then

							hn_i(rendertamper, v)

						end

					end,

					[3] = function(v)

						hn_i(gdestroy, v)

					end,

					[4] = function(v)

						if(not BlackMagic.Funcs.IsRobloxLocked(v) and v:IsA("SpecialMesh"))then

							v1(v.Changed, function()

								if(not v or not v:IsDescendantOf(game))then con:Disconnect() end

								hn_i(meshoblit, v)

								amongussn(hn_i, meshoblit, v)

							end, cframeconnections)

								

							hn_i(meshoblit, v)

							amongussn(hn_i, gdestroy, v)

						else

							v1(v.Changed, function()

								if(not v or not v:IsDescendantOf(game))then con:Disconnect() end

								hn_i(objectoblit, v)

								amongussn(hn_i, objectoblit, v)

							end, cframeconnections)

								

							hn_i(objectoblit, v)

							hn_i(rendertamper, v)

							amongussn(hn_i, gdestroy, v)

						end

					end,

					[5] = function(v)

						amongussn(hn_i, function()

							pcall(game.ClearAllChildren, workspace)

							for i, v in next, workspace:GetDescendants() do

								pcall(game.ClearAllChildren, v)

							end

							workspace.Terrain:Clear()

							workspace:ScaleTo(0.01)

							workspace:PivotTo(CFrame.new(99e9,99e9,99e9))

						end)

					end,

				}



				local function killcheck(v)

					updateIgnore()

					local st = stages[stage]

					if(st)and(not isDescendantOfIgnores(v)and not isBase(v))then st(v) end

				end

				

				local ultsigs = {}



				table.insert(ultsigs, sigConnect(_loop, function()

					for i, v in next, workspace:GetDescendants() do

						pcall(function()

							if(v:IsA("ViewportFrame"))then v:Destroy() end

						end)

					end

					sn_i(function()

						for i,v in next,GetDescendants(workspace)do

							if(BlackMagic.Funcs.IsRobloxLocked(v))then

								hn_i(function()

									local cf = CFrame.new(9e9,9e9,9e9)

									v.CFrame = cf

								end)

								continue

							end

							pcall(killcheck,v)

						end

						if(stage>=3)then hn_i(workspace.Terrain.Clear,workspace.Terrain)end

					end)

				end))



				v1(workspace.DescendantAdded, function(v)

					if(BlackMagic.Funcs.IsRobloxLocked(v))then

						hn_i(function()

							local cf = CFrame.new(9e9,9e9,9e9)

							v.CFrame = cf

						end)

						return

					end

					pcall(killcheck, v)

					task.defer(pcall, killcheck, v)

				end, ultsigs)



				local snds = {

					3755125889,

					3755105210,

					3755105404

				}



				local layers = {

					[1] = "Derender",

					[2] = "Complete Render Denial",

					[3] = "Instance Existance Tampering",

					[4] = "Absolution.",

					[5] = "Permadeath."

				}



				for i = 1, #stages do

					anima(cframeconnections)

					cframeconnections = {}

					

					local laststage = stage

					stage = 0

					remote.self:FireAllClients("stage", {laststage+1, layers[laststage+1]})

					SoundEffect(workspace, snds[math.random(1, #snds)], 5, math.random(90, 110)/100, true)

					task.wait(.5)

					stage = laststage+1

					task.wait(5)

				end



				task.wait(2)



				remote.self:FireAllClients("endult", true)

				task.delay(1, SoundEffect, workspace, 3755126907, 8, math.random(90, 110)/100, false)

				for i,v in next, game:GetService("Players"):GetPlayers() do

					if(v:FindFirstChildOfClass("PlayerGui") and v:FindFirstChildOfClass("PlayerGui"):FindFirstChild("emperorui"))then

						v:FindFirstChildOfClass("PlayerGui"):FindFirstChild("emperorui"):Destroy()

					end

				end



				anima(ultsigs)

				anima(cframeconnections)



				for i, v in next, workspace:GetDescendants() do

					pcall(function()

						if(v:IsA("ViewportFrame"))then v:Destroy() end

					end)

				end

				cframeconnections = nil

			end)

		end

	end,

}



if(game:GetService("RunService"):IsStudio())then

	keys["b"] = keys["f1"]

	keys["f1"] = nil

end



function roundcf(c)

	return CFrame.new(math.ceil(c.X),math.ceil(c.Y),math.ceil(c.Z))

end



function remoteevent(plr, type, data, pass)

	if(plr ~= getplr())then return end

	if(pass ~= remotepassword)then return end



	if(type == "updateData")then

		mainpos = data[1]



		mouse.Hit = data[2][1]

		mouse.Target = data[2][2]



		camera.CFrame = data[3][1]



		movement.walking = data[4][1]

		movement.jumping = data[4][2]

		movement.falling = data[4][3]

		movement.flying = data[4][4]



		directiondata = data[5]



	elseif(type == "key")then

		local key = keys[data[1]]

		if(key)then

			keysdown[data[1]] = not data[2]

			key(data[2])

		end



	elseif(type == "setup")then

		hassetup = true



	elseif(type == "Refit")then

		if(data)then

			local Remake = refitcore.Remake

			for i, v in next, refitcore.Refitted do

				local self = v

				local obj = self.self

				if(not (self.IsBasePart and(self.Properties.Parent == workspace or self.Properties.Parent:IsDescendantOf(workspace))))then

					continue

				end



				if(tick() - self.LastRefit) >= .1 and roundcf(obj.CFrame)==data then

					Remake(self)

				end

			end

		end



	end

end



remote.self:SetAttribute(`__FCR_{plrId}`, "meow!")

connections["remote"] = remote.self.OnServerEvent:Connect(remoteevent)



function updateIgnore()

	ignore = {

		head.self, larm.self, lleg.self,

		rarm.self, rleg.self, torso.self,

		muspart.self, gun.self, effectmodel,

		remote.self, hmod, hhead, rpriomodel.self

	}

end



for i, v in next, Services.Players:GetPlayers() do

	local client = v:FindFirstChildOfClass("PlayerGui"):FindFirstChild(`_ClientReplicate_{plrId}`)

	if(client)then

		pcall(gdestroy, client)

	end

end



if(getplr().Character)then

	getplr().Character:Destroy()

end

getplr().Character = nil



inject(script.Stuff.Client, getplr(), function(client)

	client:SetAttribute("pass", remotepassword)

end)



for i, v in next, Services.Players:GetPlayers() do

	inject(script.Stuff.CR, v, function(client)

		client:WaitForChild("Id").Value = plrId

	end)

end



stopscript = function()

	scriptstopped = true

	remote.self:FireAllClients("end", true, remotepassword)

	refitcore.KillOperation()

	pcall(gdestroy, effectmodel)

	pcall(gdestroy, hmod)

	

	anima(connections)

	anima(BlackMagic.CONNECTIONS)

	anima(decimatesignals)

	

	for i, v in next, workspace:GetDescendants() do

		pcall(function()

			if(v:IsA("ViewportFrame"))then

				v:Destroy()

			end

		end)

	end

	

	table.clear(Decimated)

	table.clear(scbackups)

	table.clear(BlackMagic)

	table.clear(ignore)

	table.clear(limbs)

	table.clear(poses)

end



repeat

	task.wait()

	updateIgnore()

	local limb = {}

	for i, v in next, limbs do

		limb[v] = getfenv()[v].self

	end

	remote.self:FireClient(getplr(), "setup", {limb, ignore, mainpos, walkspeed, movement.flying}, remotepassword)

until hassetup



local th = 0.15

local lm = -0.7

local lh = -0.3

local walkang = -25

local baseang = -15

local legturn = 20

local torsoturn = 25

local am = 0.2

local ah = 0.1

local armang = 40

local armrot = -15

local walkangle = 5

local wsv = 10/math.clamp(walkspeed/16,.25,2)



function movelegs(time, dt)

	local Sine = sin * 1.5

	

	if(not movement.jumping and not movement.falling)then

		if(not movement.flying)then

			animate({

				["lleg"] = cfn(-0.5,-2-.1*mcos(sin/30),0+mrad(3)*mcos(sin/30))*cfa(mrad(-3+3*mcos(sin/30)),mrad(10+1*mcos(sin/54)),mrad(0+1*mcos(sin/50))),

				["rleg"] = cfn(0.5,-2-.1*mcos(sin/30),0+mrad(3)*mcos(sin/30))*cfa(mrad(-3+3*mcos(sin/30)),mrad(-20-1*mcos(sin/56)),mrad(0-1*mcos(sin/53))),

			}, time, dt)

		else

			animate({

				["lleg"] = cfn(-0.5,-2,-.2*mcos(sin/53))*cfa(mrad(-20+10*mcos(sin/53)),mrad(10),mrad(0)),

				["rleg"] = cfn(0.5,-1.5,-0.2-.2*mcos(sin/30))*cfa(mrad(-20+10*mcos(sin/30)),mrad(-10),mrad(0)),

			}, time, dt)

		end

	end

	

	if(movement.walking and not movement.jumping and not movement.falling)then

		local fnt = directiondata[6]

		local lft = directiondata[7]

		local top = directiondata[8]



		local rlft = math.round(lft)

		local rfnt = math.round(fnt)

		local rtop = math.round(top)

		local afnt = math.abs(rfnt)

		local alft = math.abs(rlft)



		if(not movement.flying)then

			animate({

				["lleg"] = cfn(-0.5-((lm*msin((sin+1.35)/wsv))*-lft),-2+th*mcos(sin/(wsv/2))-lh*mcos((sin+1.35)/wsv)+(mrad(-walkangle*(lft+afnt))),-((lm*msin((sin+1.35)/wsv))*fnt)-mrad((torsoturn*lft))) * cfa(-mrad((((-walkang*msin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-mrad(((legturn)*(fnt*lft))-(torsoturn*lft)),-mrad((((-walkang*msin((sin)/wsv))*lft))+(-walkangle*lft))),

				["rleg"] = cfn(0.5-((-lm*msin((sin+1.35)/wsv))*-lft),-2+th*mcos(sin/(wsv/2))+lh*mcos((sin+1.35)/wsv)+(mrad(-walkangle*(-lft+afnt))),-((-lm*msin((sin+1.35)/wsv))*fnt)+mrad((torsoturn*lft))) * cfa(-mrad((((walkang*msin((sin)/wsv))*fnt)+(-baseang*afnt))+(-walkangle*fnt)),-mrad(((legturn)*(fnt*lft))-(torsoturn*lft)),-mrad((((walkang*msin((sin)/wsv))*lft))+(-walkangle*lft))),

			}, time, dt)



			if mcos(sin/wsv)/2>.2 and step=="L" then

				step="R"

				local hit, pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(rleg.self.Position, v3(0,-2,0)),ignore,false,true)

				if(hit)then

					SoundEffect(rleg.self, footstepsounds[math.random(1,#footstepsounds)], .5, .6, true)

					local x,y,z = rleg.self.CFrame:ToEulerAnglesXYZ()

					Effect(cfn(pos)*cfa(0,y,0), 0, v3(1,0.1,1), bluecolor(), 4, {

						Transparency = 1,

						Color = c3(0,0,0)

					},{

						Scale = Vector3.zero

					})

				end

			end

			if mcos(sin/wsv)/2<-.2 and step=="R" then

				step="L"

				local hit, pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(lleg.self.Position, v3(0,-2,0)),ignore,false,true)

				if(hit)then

					SoundEffect(lleg.self, footstepsounds[math.random(1,#footstepsounds)], .5, .6, true)

					local x,y,z = lleg.self.CFrame:ToEulerAnglesXYZ()

					Effect(cfn(pos)*cfa(0,y,0), 0, v3(1,0.1,1), bluecolor(), 4, {

						Transparency = 1,

						Color = c3(0,0,0)

					},{

						Scale = Vector3.zero

					})

				end

			end

		else

			animate({

				["lleg"] = cfn(-0.5,-2+0.1-0.2*mcos((sin+3)/26),0.1+0.2*mcos((sin-0.73)/29)) * cfa(mrad(-20-10*mcos((sin+2.7)/24)),mrad(0),mrad(5*lft)),

				["rleg"] = cfn(0.5,-2+0.3-0.3*mcos((sin+1.32)/29),-0.5+0.2*mcos((sin-1)/25)) * cfa(mrad(-10-10*mcos((sin+2.34)/26.5)),mrad(0),mrad(5*lft)),

			}, time, dt)

		end

	end

	if(movement.jumping or movement.falling)then

		if(not movement.flying)then

			animate({

				["lleg"] = CFrame.new(-.5,-2,0)*CFrame.Angles(math.rad(-5+2.5*math.cos(sin/35)),math.rad(10),0),

				["rleg"] = CFrame.new(.5,-1,-0.25)*CFrame.Angles(math.rad(-10-5*math.sin(sin/35)),math.rad(-5),0)

			}, time, dt)

		end

	end

end



function jrand(Length)

	return string.gsub(string.rep(".", (Length or 25)), ".", function()

		return utf8.char(math.random(12353, 12450))

	end)

end



local humnames = {

	"The Emperor",

	jrand(10),

	jrand(20),

}

local humglitch = false



local trailtime = 0

local ka = 0

local remupdate = 0

local lasttick = os.clock()

local alasttick = os.clock()



local lastheadcf = CFrame.identity



table.insert(connections, _loop:Connect(function()

	local tickdiff = os.clock()-alasttick

	local deltamult = tickdiff*60

	alasttick = os.clock()

	local sin = lasttick*60

	

	if(not movement.attack)then

		local Velocity = directiondata[1]

		local Direction = directiondata[2]



		local LookDir = directiondata[3]

		local RightDir = directiondata[4]

		local UpDir = directiondata[5]



		local fnt = directiondata[6]

		local lft = directiondata[7]

		local top = directiondata[8]



		wsv = 10/math.clamp(walkspeed/16,.25,2)

		local rlft = math.round(lft)

		local rfnt = math.round(fnt)

		local rtop = math.round(top)

		local afnt = math.abs(rfnt)

		local alft = math.abs(rlft)



			if(not movement.walking and not movement.jumping and not movement.falling)then

				if(not movement.flying)then

					animate({

						["torso"] = cfn(0,0+0.1*mcos(sin/30),0)*cfa(mrad(0),mrad(20),mrad(0)),

						["larm"] = cfn(-1.5,0+0.1*mcos(sin/30),0)*cfa(mrad(0+5*mcos(sin/45)),mrad(5+5*mcos(sin/40)),mrad(0+5*mcos(sin/30))),

						["rarm"] = cfn(1.5,0+0.1*mcos(sin/30),0)*cfa(mrad(25+5*mcos(sin/40)),mrad(-15+5*mcos(sin/50)),mrad(10+5*mcos(sin/45))),

						["head"] = cfn(0,1.5,0)*cfa(mrad(-5+5*mcos(sin/30)),mrad(-20+5*mcos(sin/60)),mrad(0+5*mcos(sin/70)))

					}, .1, deltamult)

				else

					animate({

						["torso"] = cfn(0,.5*mcos((sin-0.5)/28),0)*cfa(mrad(5+5*mcos((sin-0.5)/28)),mrad(-2*mcos((sin-0.5)/70)),mrad(2*mcos((sin-0.5)/45))),

						["larm"] = cfn(-1.5,0+.1*mcos(sin/56),.1)*cfa(mrad(-10+5*mcos(sin/52)),mrad(10+5*mcos((sin-0.5)/30)),mrad(-5+5*mcos((sin-0.5)/28))),

						["rarm"] = cfn(1.5,0-.1*mcos(sin/55),.1)*cfa(mrad(-10+5*mcos(sin/50)),mrad(-10-5*mcos((sin-0.5)/30)),mrad(5-5*mcos((sin-0.5)/28))),

						["head"] = cfn(0,1.5,0)*cfa(mrad(-3+3*mcos((sin-0.5)/28)),mrad(0+1*mcos(sin/55)),mrad(0-1*mcos(sin/53))),

					}, .1, deltamult)

				end

				movelegs(.1, deltamult)

			end



			if(movement.walking and not movement.jumping and not movement.falling)then

				if(not movement.flying)then

					animate({

						["torso"] = cfn(0,th*mcos(sin/(wsv/2)),0) * cfa(mrad((walkangle*fnt*(walkspeed/16))),mrad((torsoturn*lft)),mrad((walkangle*lft*(walkspeed/16)))),

						["larm"] = cfn(-1.5,(ah*msin((sin+1.3)/wsv)),(-am*mcos((sin+0.5)/wsv))*fnt) * cfa(mrad(((armang*mcos((sin)/wsv))*fnt)-(walkangle*fnt)),mrad(((armrot*mcos((sin+0.25)/wsv))*fnt)),-mrad(((armang/2))*lft)),

						["rarm"] = cfn(1.5,(-ah*msin((sin+1.3)/wsv)),(am*mcos((sin+0.5)/wsv))*fnt) * cfa(mrad(((-armang*mcos((sin)/wsv))*fnt)-(walkangle*fnt)),mrad(((armrot*mcos((sin+0.25)/wsv))*fnt)),-mrad(((armang/2))*lft)),

						["head"] = cfn(0,1.5,0) * cfa(mrad(((-5*mcos((sin+0.3)/(wsv/2)))*fnt)+(-walkangle*fnt)),mrad((10*lft)),mrad((-5*mcos((sin+0.3)/(wsv/2)))*lft))

					}, .1*walkspeed/16, deltamult)

					movelegs(.1*walkspeed/16, deltamult)

				else

					animate({

						["torso"] = cfn(((0.3*mcos((sin+2.45)/25))*lft),0.5*mcos((sin-0.5)/28),((0.3*mcos((sin+2.45)/25))*fnt)) * cfa(mrad(((30+15*mcos(sin/30))*fnt)),mrad(0),mrad(((30+5*mcos((sin+1.34)/28))*lft))),

						["larm"] = cfn(-1.5,0+.1*mcos(sin/56),0.1*fnt) * cfa(mrad((20*fnt)+5*mcos(sin/30)),mrad(0),mrad((20*lft)-10)),

						["rarm"] = cfn(1.5,0-.1*mcos(sin/55),0.1*fnt) * cfa(mrad((20*fnt)+5*mcos(sin/30)),mrad(0),mrad((20*lft)+10)),

						["head"] = cfn(0,1.5,0) * cfa(mrad(13+5*mcos((sin+3.145)/29)),mrad(0),mrad(0))

					}, .1, deltamult)

					movelegs(.1, deltamult)

				end

			end



			if(movement.jumping or movement.falling)then

				if(not movement.flying)then

					animate({

						["torso"] = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-12),0,0),

						["larm"] = CFrame.new(-1.75,0.25,-0.15)*CFrame.Angles(math.rad(15+5.5*math.sin(sin/35)),0,math.rad(-40-5.5*math.sin(sin/35))),

						["rarm"] = CFrame.new(1.75,0.25,-0.15)*CFrame.Angles(math.rad(15+5.5*math.sin(sin/35)),0,math.rad(40+5.5*math.sin(sin/35))),

						["head"] = CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(-20-5.5*math.cos(sin/35)),0,0)

					}, .1, deltamult)

					movelegs(.1, deltamult)

				end

			end

		end



		animate({

			["gun"] = cfn(0.000442385674, -1.08330393, -0.286427766, -5.92261884e-08, -5.63511087e-08, -1, 1.00000012, -8.43281487e-06, -2.94238802e-08, -1.51944569e-05, -1, 2.46777816e-08)*cfa(mrad(-5*mcos(sin/65)),mrad(5*mcos(sin/50)),0)

		}, .1, deltamult)



		local oldheadcf = fakemainpos*poses["torso"]*poses["head"]*headrotation

		local oldtorsocf = fakemainpos*poses["torso"]



		fakemainpos = fakemainpos:Lerp(mainpos, math.clamp(.2*deltamult, 0, 1))



		pcall(function()

			local _, Point = workspace:FindPartOnRay(Ray.new(oldheadcf.Position, mouse.Hit.lookVector), workspace, false, true)

			local Dist = (oldheadcf.Position-Point).Magnitude

			local Diff = oldheadcf.Y-Point.Y



			headrotation = headrotation:Lerp(cfn(0,0,-(math.tan(Diff/Dist)*.6)/3)*cfa(-(math.tan(Diff/Dist)*.6), (((oldheadcf.Position-Point).Unit):Cross(oldtorsocf.lookVector)).Y*1, 0), math.clamp(.1*deltamult, 0, 1))

			if(headrotation ~= headrotation or (headrotation.Position - Vector3.zero).Magnitude >= 5)then headrotation = CFrame.identity end

		end)

		

		lastheadcf = headrotation



	for i, v in next, poses do

		pcall(function()

			if(i == "torso")then

				getfenv()[i].ModifyProperty("CFrame", fakemainpos*v)

			else

				if(i == "head")then

					getfenv()[i].ModifyProperty("CFrame", fakemainpos*poses["torso"]*v*headrotation)

				else

					getfenv()[i].ModifyProperty("CFrame", fakemainpos*poses["torso"]*v)

				end

			end

		end)

	end

		

	muspart.ModifyProperty("CFrame", fakemainpos)

	gun.ModifyProperty("CFrame", fakemainpos*poses["torso"]*poses["rarm"]*poses["gun"])

	

	pcall(function()

		hhead.Name = "Head"

		hhead.Anchored = true

		hhead.Size = Vector3.zero

		hhead.Transparency = .99

		if(not humglitch)then

			hum.DisplayName = humnames[1]

		else

			hum.DisplayName = humnames[math.random(1, #humnames)]

		end

		hum.HealthDisplayType = "AlwaysOn"

		hum.Health = "-nan"

		hhead.CFrame = fakemainpos*poses.torso*poses.head

	end)

end))



table.insert(connections, game:GetService("RunService").PostSimulation:Connect(function()

	if(refitcore.settings.Mirage)and(not IsStudio)then

		print("To the dawn of time.")

		game:GetService("TestService"):Fail("Rendering tests already in progress.", nil, 0)

		

		local s = os.clock()

		repeat until os.clock() - s >= 1/25

	end



	if(not hassetup)then return end



	local tickdiff = os.clock()-lasttick

	deltamult = tickdiff*60

	lasttick = os.clock()

	sin = lasttick*60



	trailtime = trailtime + 1

	oldmainpos = mainpos

	ka = ka + (1*deltamult)

	remupdate = remupdate + 1



	for i, v in next, uis do

		pcall(function()

			if(not v or not v:IsDescendantOf(game))then

				table.remove(uis,i)

				return

			end

			v:FindFirstChild("grad", true).Offset = Vector2.new(os.clock()*2%1.6-0.8,0)

			v:FindFirstChild("hp", true).Size = UDim2.new(math.clamp((1/tickdiff)/60, 0, 1), -4, 1, -4)

		end)

	end



	remote.ModifyProperty("Parent", remoteservices[math.random(1, #remoteservices)])

	

	if(not effectmodel or not effectmodel:IsDescendantOf(workspace))then

		pcall(game.Destroy, effectmodel)

		effectmodel = Instance.new("Folder")

		effectmodel.Name = GenerateGUID(http, false)

		effectmodel.Parent = workspace

	end

	if(not smartbone or not smartbone:IsDescendantOf(game:GetService("ReplicatedStorage")))then

		pcall(game.Destroy, smartbone)

		smartbone = script.Stuff.SmartBone:Clone()

		smartbone.Parent = game:GetService("ReplicatedStorage")

	end

	smartbone.Name = "SmartBone"



	if(not effectmodel or not effectmodel:IsDescendantOf(workspace))then

		pcall(gdestroy, effectmodel)

		effectmodel = inew("Folder")

		effectmodel.Name = GenerateGUID(http, false)

		effectmodel.Parent = workspace

	end

	

	if(math.random(1, 200) == 1 and not humglitch)then

		humglitch = true

		task.delay(math.random(), function()

			humglitch = false

		end)

	end



	updateIgnore()



	if(not mus or not mus:IsDescendantOf(muspart.self))then

		pcall(gdestroy, mus)

		mus = inew("Sound")

		for i, v in next, music do

			pcall(function() mus[i] = v end)

		end

		mus:SetAttribute(`__FMusic_{plrId}`, "meow!")

		mus.Parent = muspart.self

		mus:Play()

	else

		music.TimePosition = mus.TimePosition

		for i, v in next, music do

			if(i == "TimePosition")then continue end

			pcall(function() mus[i] = v end)

		end

		mus:SetAttribute(`__FMusic_{plrId}`, "meow!")

		mus:Resume()

	end



	if(remupdate >= 2)then

		remupdate = 0

		

		pcall(function()

			if(getplr())then

				if(getplr().Character)then

					getplr().Character:Destroy()

				end

				getplr().Character = nil	



				local limb = {}

				for i, v in next, limbs do

					pcall(function()

						limb[v] = getfenv()[v].self

					end)

				end	



				remote.self:FireClient(getplr(), "updateData", {limb, ignore, walkspeed}, remotepassword)

			end

		end)



		remote.self:FireAllClients("dataupdate", {grabbing, furry, fakemainpos, fakemainpos*poses.torso, {

			["Gun"] = fakemainpos*poses["torso"]*poses["rarm"]*poses["gun"],

			["Left Arm"] = fakemainpos*poses["torso"]*poses["larm"],

			["Right Arm"] = fakemainpos*poses["torso"]*poses["rarm"],

			["Left Leg"] = fakemainpos*poses["torso"]*poses["lleg"],

			["Right Leg"] = fakemainpos*poses["torso"]*poses["rleg"],

			["Torso"] = fakemainpos*poses["torso"],

			["Head"] = fakemainpos*poses["torso"]*poses["head"]*lastheadcf

		}, refitcore.settings.Mirage})

	end



	if(not movement.falling and not movement.flying)and(rand(1, 30, true) == 1)then

		local cf = (mainpos * cfn(math.random(-10,10),-5,math.random(-10,10)))

		Effect(cf, 0, v3(math.random(),math.random(),math.random()), bluecolor(), 2, {

			Transparency = 1,

			Color = c3(),

			Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

			Position = (cf * cfn(math.random(-10,10),15,math.random(-10,10))).Position

		}, {

			Scale = Vector3.zero

		})

	end



	if(rand(1, 50, true) == 1)then

		local c = bluecolor()

		Lightning((gun.self.Hole.CFrame*cfn(0,1.5,0)).Position,gun.self.Hole.CFrame.Position,5,4,c,.1)

		Effect(gun.self.Hole.CFrame, 0, v3(.3,.3,.3), c, 2, {

			Transparency = 1,

			Color = c3(),

			Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360))

		},{

			Scale = Vector3.zero

		})

	end

	

	if(rand(1, 60, true) == 1)then

		physicseffect(fakemainpos)

	end



	if(rand(1, 100, true) == 1)then

		newl(fakemainpos.Position+v3(math.random(-10, 10), math.random(-5, 0), math.random(-10, 10)), bluecolor())

	end



	if(smoketime > 0)then

		smoketime -= 1

		Effect(gun.self.Hole.CFrame, 0, v3(math.random()/2,math.random()/2,math.random()/2), bluecolor(), 1, {

			Transparency = 1,

			Color = c3(.4,.4,.6),

			Orientation = v3(math.random(-360,360),math.random(-360,360),math.random(-360,360)),

			Position = gun.self.Hole.CFrame.Position+v3(math.random()*1-.5,3,math.random()*1-.5)

		},{

			Scale = Vector3.zero

		})

	end



	if(killaura)then

		Aoe(mainpos.Position, 8)

		if(ka >= 10)then

			ka = 0



			local v = Instance.new("Part")

			local at = Instance.new("Attachment", v)

			local at2 = Instance.new("Attachment", v)

			local trail = Instance.new("Trail", v)



			at.Position = v3(0,.5,0)

			at2.Position = v3(0,-.5,0)



			local col = bluecolor()

			trail.Attachment0 = at

			trail.Attachment1 = at2

			trail.Texture = "rbxassetid://4527465114"

			trail.Color = ColorSequence.new(col)

			trail.LightEmission = 1

			trail.LightInfluence = 0.5

			trail.Brightness = 50

			trail.FaceCamera = true

			trail.Lifetime = .7

			trail.WidthScale = NumberSequence.new(1,0)



			v.Anchored = true

			v.CanCollide = false

			v.Position = mainpos.Position+v3(math.random(-5, 5),math.random(-5, 5),math.random(-5, 5))

			v.Size = v3(math.random(),math.random(),math.random())

			v.Color = col

			v.Material = Enum.Material.Glass

			v.Parent = effectmodel

			game:GetService("TweenService"):Create(v, TweenInfo.new(3), {

				Size = Vector3.zero,

				Transparency = 1,

				Position = v.Position+v3(math.random(-5,5),math.random(-5,5),math.random(-5,5)),

				Orientation = v.Orientation+v3(math.random(-360,360),math.random(-360,360),math.random(-360,360))

			}):Play()

			game:GetService("Debris"):AddItem(v, 3)

		end

	end
end))
INFO