Untitled

Run Settings
LanguageLua
Language Version
Run Command
script.Parent = nil; --[[ ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓████████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓████████▓▒░ ]] -- <> Cube Rewrite 7 </> -- <> Services <> local Players = game:GetService("Players") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") -- <> Variables </> local currentPhysicsFPS = math.round(workspace:GetRealPhysicsFPS()) local currentServerFPS = math.round(1 / RunService.Heartbeat:Wait()) -- <> Functions </> --[[<Aqua> (Can i use this?????) local function mathUUID() return string.gsub('xxxxxxxxxxxxhxxxqxxxxxxxxxxxxxxx', '[xq]', function (c) local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb) return string.format('%x', v) end) end -- </Aqua>]] local function randomStr() local charArray = {} local lenght = math.random(20, 33) for i = 1, lenght do local char = string.char(math.random(33, 127)) table.insert(charArray, char) end local str = table.concat(charArray) return str end local bindableEvent = Instance.new("BindableEvent") bindableEvent.Event:Connect(function(instance, signalName, func) task.synchronize() return instance[signalName]:Once(func) end) local function parallelOnce(instance, signalName, func) return bindableEvent:Fire(instance, signalName, func) end local parallel = false local function dynamicParallel(instance, signalName, func) if parallel then return parallelOnce(instance, signalName, func) else return instance[signalName]:Once(func) end end -- <> Priorities </> local snLevel = 0 local stallLevel = 0 local TPrio = Instance.new("NumberValue") TPrio.Name = "" TPrio.Value = -math.huge game:GetService("TweenService"):Create(TPrio, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, math.huge, false),{Value=math.huge}):Play() local ev = Instance.new("BindableEvent") TPrio:GetPropertyChangedSignal("Value"):Connect(function() ev:Fire() end) game:GetService("RunService").Heartbeat:Connect(function(Delta) TPrio=TPrio end) local function tweenpriority(f,...) return ev.Event:Connect(function(...) f(...) end,...) end local stall = function(x, func, ...) for i = 1, (x ~= 0 and x or 1) do task.desynchronize() task.synchronize() end func() end local bootlegSN = function(maxDepth, func, ...) local depth = 0 local recursiveFunc recursiveFunc = function(...) if depth == (maxDepth ~= 0 and maxDepth or 1) then func(...) return end depth = depth + 1 local function deferFunc(func, ...) return function(...) task.defer(func, ...) end end recursiveFunc(...) end recursiveFunc(...) end -- <> Constants </> local CFRAMEOFFSET = CFrame.new(5, 0, 0) local MESHOFFSET = Vector3.new(0, 10^5, 0) local NEGATIVEMESHOFFSET = Vector3.new(0, -10^5, 0) local CUBESIZE = Vector3.new(2.5, 2.5, 2.5) local EXTENDSIZE = Vector3.new(2.5, 2.5, 500) local VOIDPOSITION = Vector3.new(0, -9e9, 0) -- <> Varaibles </> local randomString = randomStr() local randomString2 = randomStr() -- <> Cube </> local useMesh = true local cubeOffset = Vector3.zero local negativeCubeOffset = Vector3.zero local move = true local tweening = false local sizeInfo = TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out) local function createCube(config) if not typeof(config) == "table" then return end useMesh = config.UseMesh cube = Instance.new("Part") cube.Name = config.Name cube.Size = config.Size cube.Anchored = true cube.CanCollide = config.CanCollide cube.CanTouch = config.CanTouch cube.CanQuery = config.CanQuery cube.Parent = config.Parent if useMesh then cubeMesh = Instance.new("SpecialMesh") cubeMesh.Scale = Vector3.new(1, 1, 1) cubeMesh.Offset = NEGATIVEMESHOFFSET cubeMesh.MeshType = Enum.MeshType.Brick cubeOffset = MESHOFFSET negativeCubeOffset = NEGATIVEMESHOFFSET cube.CFrame = config.CFrame + cubeOffset cubeMesh.Parent = cube else cube.CFrame = config.CFrame end return cube end local function lerpCube(cube, CFrame, deltaTime) if not move then return end local offsettedCFrame = CFrame + cubeOffset local alpha =(deltaTime and (5 * deltaTime) or 0.1) cube.CFrame = cube.CFrame:Lerp(offsettedCFrame, alpha) end local function setCubeCFrame(cube, CFrame) local offsettedCFrame = CFrame + cubeOffset cube.CFrame = offsettedCFrame end local function moving(bool) move = bool end local function usingMesh(bool, config) if bool then useMesh = true cubeOffset = MESHOFFSET negativeCubeOffset = NEGATIVEMESHOFFSET cubeMesh.Offset = negativeCubeOffset config.UseMesh = true else useMesh = false cubeOffset = Vector3.zero negativeCubeOffset = Vector3.zero cubeMesh.Offset = negativeCubeOffset config.UseMesh = false end end local function getPartsInCubeArea(cube) local partsInArea = {} local cubePos = cube.Position local partPosition = nil local meshOffset = Vector3.zero for _, part in pairs(workspace:GetDescendants()) do if part:IsA("BasePart") and part ~= cube then local partPosition = part.Position if part:FindFirstChildOfClass("SpecialMesh") then meshOffset = part:FindFirstChildOfClass("SpecialMesh").Offset end if ((cubePos + negativeCubeOffset) - (part.Position + meshOffset)).Magnitude <= cube.Size.Magnitude then table.insert(partsInArea, part) end end end return partsInArea end local function cubeIsCloseToPosition(cube, pos, area) local cubePosition = cube.Position + negativeCubeOffset local distance = (cubePosition - position).Magnitude return distance <= area end local function tweenCube(cube, info, goal) tweening = true local tween = TweenService:Create(cube, info, goal) tween:Play() tween.Completed:Connect(function() tweening = false end) end local function cubeIsMoving() return move end local function cubeIsUsingMesh() return useMesh end local function cubeIsTweening() return tweening end local function tweenCube(cube, info, goal) tweening = true local tween = TweenService:Create(cube, info, goal) tween:Play() tween.Completed:Connect(function() tweening = false end) end -- <> Gui </> local screenGui = nil local function createGui(parent) screenGui = Instance.new("ScreenGui") screenGui.Parent = parent return screenGui end local function createFrame(config) local frame = Instance.new("Frame") frame.Size = config.Size frame.AnchorPoint = config.AnchorPoint frame.Position = config.Position frame.Draggable = config.Draggable frame.BackgroundColor3 = config.BackgroundColor3 frame.BackgroundTransparency = config.BackgroundTransparency frame.ZIndex = config.ZIndex frame.Active = true frame.Parent = config.Parent return frame end local function createScrollingFrame(config) local scrollingFrame = Instance.new("ScrollingFrame") scrollingFrame.Size = config.Size scrollingFrame.AnchorPoint = config.AnchorPoint scrollingFrame.Position = config.Position scrollingFrame.Draggable = config.Draggable scrollingFrame.BackgroundColor3 = config.BackgroundColor3 scrollingFrame.BackgroundTransparency = config.BackgroundTransparency scrollingFrame.AutomaticCanvasSize = config.AutomaticCanvasSize scrollingFrame.CanvasSize = config.CanvasSize scrollingFrame.ScrollBarThickness = config.ScrollBarThickness scrollingFrame.ScrollingDirection = config.ScrollingDirection scrollingFrame.VerticalScrollBarPosition = config.VerticalScrollBarPosition scrollingFrame.ZIndex = config.ZIndex scrollingFrame.Active = true scrollingFrame.Parent = config.Parent return scrollingFrame end local function createTextButton(config) local button = Instance.new("TextButton") button.Size = config.Size button.Position = config.Position button.Text = config.Text button.TextColor3 = config.TextColor3 button.TextSize = config.TextSize button.TextScaled = config.TextScaled button.Font = config.Font button.BackgroundColor3 = config.BackgroundColor3 button.BackgroundTransparency = config.BackgroundTransparency button.ZIndex = config.ZIndex button.Parent = config.Parent return button end local function createTextLabel(config) local textLabel = Instance.new("TextLabel") textLabel.Size = config.Size textLabel.AnchorPoint = config.AnchorPoint textLabel.Position = config.Position textLabel.Text = config.Text textLabel.TextSize = config.TextSize textLabel.TextScaled = config.TextScaled textLabel.TextColor3 = config.TextColor3 textLabel.Font = config.Font textLabel.BackgroundColor3 = config.BackgroundColor3 textLabel.BackgroundTransparency = config.BackgroundTransparency textLabel.ZIndex = config.ZIndex textLabel.Parent = config.Parent return textLabel end local function createTextBox(config) local textBox = Instance.new("TextBox") textBox.Size = config.Size textBox.Position = config.Position textBox.PlaceholderText = config.PlaceholderText textBox.RichText = config.RichText textBox.TextSize = config.TextSize textBox.TextColor3 = config.TextColor3 textBox.Font = config.Font textBox.BackgroundColor3 = config.BackgroundColor3 textBox.Parent = config.Parent return textBox end local function createListLayout(config) local UIListLayout = Instance.new("UIListLayout") UIListLayout.Parent = config.Parent return UIListLayout end local function createUICorner(parent, radius) local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(radius) UICorner.Parent = parent end local function tweenObject(object, info, goal) local tween = TweenService:Create(object, info, goal) tween:Play() end local function changeObjectColor(object, color3) object.BackgroundColor3 = Color3 end -- <> Main Script </> local playerName = "tabanog1234" local player = Players:FindFirstChild(playerName) assert(player, playerName .. " not found.") local playerCharacter = player.Character or player.CharacterAdded:Wait() local playerHumanoidRootPart = playerCharacter.HumanoidRootPart local lastPlayerCFrame = playerHumanoidRootPart.CFrame local playerGui = player.PlayerGui local cubeOffset = lastPlayerCFrame * CFRAMEOFFSET local cubeConfig = { UseMesh = true, Parent = workspace, Name = randomString, Size = CUBESIZE, CFrame = cubeOffset, CanCollide = false, CanTouch = false, CanQuery = false } local myCube = createCube(cubeConfig) local myGui = createGui(playerGui) myGui.ResetOnSpawn = false local frameConfig1 = { Size = UDim2.fromScale(0.2, 0.5), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Draggable = true, BackgroundColor3 = Color3.fromRGB(0, 0, 0), BackgroundTransparency = 0.3, ZIndex = 1, Parent = myGui } local frameConfig2 = { Size = UDim2.fromScale(1, 0.2), AnchorPoint = Vector2.new(0, 0), Position = UDim2.fromScale(0, 0), Draggable = false, BackgroundColor3 = Color3.fromRGB(0, 0, 0), BackgroundTransparency = 1, ZIndex = 2, Parent = nil } local frameConfig3 = { Size = UDim2.fromScale(0.3, 0.5), AnchorPoint = Vector2.new(0, 0), Position = UDim2.fromScale(0.6, 0.25), Draggable = false, BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0, ZIndex = 3, Parent = nil } local frameConfig4 = { Size = UDim2.fromScale(0.5, 1), AnchorPoint = Vector2.new(0, 0), Position = UDim2.fromScale(0.25, 0.05), Draggable = false, BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 1, ZIndex = 3, Parent = nil } local scrollingFrameConfig = { Size = UDim2.fromScale(1, 0.8), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Draggable = false, BackgroundColor3 = Color3.fromRGB(0, 0, 0), BackgroundTransparency = 1, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.fromScale(1, 1), ScrollBarThickness = 5, ScrollingDirection = Enum.ScrollingDirection.Y, VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Right, ZIndex = 2, Parent = nil } local textLabelConfig1 = { Size = UDim2.fromScale(0.3, 0.2), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.05), Text = "Funny Cube Gui", TextSize = 20, TextScaled = false, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 1, ZIndex = 2, Parent = nil } local textLabelConfig2 = { Size = UDim2.fromScale(1, 1), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.25, 0.5), Text = "UseMesh", TextSize = 20, TextScaled = false, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 1, ZIndex = 3, Parent = nil } local textLabelConfig3 = { Size = UDim2.fromScale(1, 1), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.3), Text = "SN Level", TextSize = 20, TextScaled = false, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 1, ZIndex = 3, Parent = nil } local textLabelConfig4 = { Size = UDim2.fromScale(1, 1), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.6), Text = "0", TextSize = 20, TextScaled = false, TextColor3 = Color3.fromRGB(255, 255, 255), Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 1, ZIndex = 3, Parent = nil } local buttonConfig1 = { Size = UDim2.fromScale(0.5, 1), Position = UDim2.fromScale(0.5, 0), Text = "", TextColor3 = Color3.fromRGB(0, 0, 0), TextSize = 50, TextScaled = false, Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.fromRGB(57, 255, 20), BackgroundTransparency = 0, Parent = nil, ZIndex = 3 } local buttonConfig2 = { Size = UDim2.fromScale(0.2, 0.3), Position = UDim2.fromScale(0.05, 0.4), Text = "+", TextSize = 50, TextColor3 = Color3.fromRGB(255, 255, 255), TextScaled = false, Font = Enum.Font.GothamMedium, BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 1, Parent = nil, ZIndex = 3 } local layoutConfig = { Parent = nil } local void = false local banish = false local function connectCubeEvents() tweenpriority(function() bootlegSN(snLevel, function() myCube:GetPropertyChangedSignal("CFrame"):Connect(function() local cubeCFrame = myCube.CFrame + negativeCubeOffset if (cubeCFrame.Position - playerHumanoidRootPart.Position).Magnitude >= 50 then stall(stallLevel, function() setCubeCFrame(myCube, cubeOffset) end) end end) end) end) tweenpriority(function() bootlegSN(snLevel, function() myCube.ChildAdded:Once(function(descendant) if descendant.Name ~= randomString then task.wait() descendant:Destroy() end end) end) end) if myCube:FindFirstChildOfClass("SpecialMesh") then local cubeMesh = myCube:FindFirstChildOfClass("SpecialMesh") tweenpriority(function() bootlegSN(snLevel, function() cubeMesh.Changed:Once(function(property, value) if property == "MeshType" then cubeMesh.MeshType = Enum.MeshType.Brick elseif property == "Scale" then cubeMesh.Scale = Vector3.new(1, 1, 1) elseif property == "Offset" then cubeMesh.Offset = negativeCubeOffset end end) end) end) end end connectCubeEvents() local banishTable = {} local function clearTables() banishTable = {} end local function createGui(gui) local mainFrame = createFrame(frameConfig1) textLabelConfig1.Parent = mainFrame scrollingFrameConfig.Parent = mainFrame local clickSound = Instance.new("Sound") clickSound.Parent = gui clickSound.Name = "clickSound" clickSound.SoundId = "rbxassetid://3868133279" local extended = false local shrink = false local fullPower = false local guiName = createTextLabel(textLabelConfig1) local scrollingFrame = createScrollingFrame(scrollingFrameConfig) frameConfig2.Parent = scrollingFrame layoutConfig.Parent = scrollingFrame local listLayout = createListLayout(layoutConfig) local meshButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = meshButtonFrame frameConfig3.Parent = meshButtonFrame local meshLabel = createTextLabel(textLabelConfig2) local meshButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = meshButtonHolder local meshButton = createTextButton(buttonConfig1) local moveButtonFrame = createFrame(frameConfig2) textLabelConfig2.Text = "Move" textLabelConfig2.Parent = moveButtonFrame frameConfig3.Parent = moveButtonFrame local moveLabel = createTextLabel(textLabelConfig2) local moveButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = moveButtonHolder local moveButton = createTextButton(buttonConfig1) local buttonInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) buttonConfig1.Position = UDim2.fromScale(0, 0) buttonConfig1.BackgroundColor3 = Color3.fromRGB(255, 91, 91) local voidButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = voidButtonFrame textLabelConfig2.Text = "Void" frameConfig3.Parent = voidButtonFrame local voidLabel = createTextLabel(textLabelConfig2) local voidButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = voidButtonHolder local voidButton = createTextButton(buttonConfig1) local banishButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = banishButtonFrame textLabelConfig2.Text = "Banish" frameConfig3.Parent = banishButtonFrame local banishLabel = createTextLabel(textLabelConfig2) local banishButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = banishButtonHolder local banishButton = createTextButton(buttonConfig1) local parallelButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = parallelButtonFrame textLabelConfig2.Text = "UseParallel" frameConfig3.Parent = parallelButtonFrame local parallelLabel = createTextLabel(textLabelConfig2) local parallelButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = parallelButtonHolder local parallelButton = createTextButton(buttonConfig1) local extendButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = extendButtonFrame textLabelConfig2.Text = "Extended" frameConfig3.Parent = extendButtonFrame local extendLabel = createTextLabel(textLabelConfig2) local extendButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = extendButtonHolder local extendButton = createTextButton(buttonConfig1) local shrinkButtonFrame = createFrame(frameConfig2) textLabelConfig2.Parent = shrinkButtonFrame textLabelConfig2.Text = "Shrink" frameConfig3.Parent = shrinkButtonFrame local shrinkLabel = createTextLabel(textLabelConfig2) local shrinkButtonHolder = createFrame(frameConfig3) buttonConfig1.Parent = shrinkButtonHolder local shrinkButton = createTextButton(buttonConfig1) local snLevelButtonsFrame = createFrame(frameConfig2) frameConfig4.Parent = snLevelButtonsFrame local snLevelHolder = createFrame(frameConfig4) textLabelConfig3.Parent = snLevelHolder textLabelConfig4.Parent = snLevelHolder local snLevelLabel = createTextLabel(textLabelConfig3) buttonConfig2.Parent = snLevelButtonsFrame local snLevelNumLabel = createTextLabel(textLabelConfig4) local snAddButton = createTextButton(buttonConfig2) buttonConfig2.Text = "-" buttonConfig2.Position = UDim2.fromScale(0.75, 0.35) local snMinusButton = createTextButton(buttonConfig2) buttonConfig2.Text = "+" buttonConfig2.Position = UDim2.fromScale(0.05, 0.4) local stallLevelButtonsFrame = createFrame(frameConfig2) frameConfig4.Parent = stallLevelButtonsFrame local stallLevelHolder = createFrame(frameConfig4) textLabelConfig3.Text = "Stall Level" textLabelConfig3.Parent = stallLevelHolder textLabelConfig4.Parent = stallLevelHolder local snLevelLabel = createTextLabel(textLabelConfig3) buttonConfig2.Parent = stallLevelButtonsFrame local stallLevelNumLabel = createTextLabel(textLabelConfig4) local stallAddButton = createTextButton(buttonConfig2) buttonConfig2.Text = "-" buttonConfig2.Position = UDim2.fromScale(0.75, 0.35) local stallMinusButton = createTextButton(buttonConfig2) local serverFPSFrame = createFrame(frameConfig2) textLabelConfig3.Parent = serverFPSFrame textLabelConfig4.Parent = serverFPSFrame textLabelConfig3.Text = "Server FPS:" textLabelConfig4.Text = currentServerFPS textLabelConfig3.Position = UDim2.fromScale(0.4, 0.5) textLabelConfig4.Position = UDim2.fromScale(0.8, 0.5) local serverFPSLabel = createTextLabel(textLabelConfig3) local serverFPSNumLabel = createTextLabel(textLabelConfig4) local physFPSFrame = createFrame(frameConfig2) textLabelConfig3.Parent = physFPSFrame textLabelConfig4.Parent = physFPSFrame textLabelConfig3.Text = "Physics FPS:" textLabelConfig4.Text = currentPhysicsFPS local physFPSLabel = createTextLabel(textLabelConfig3) local physFPSNumLabel = createTextLabel(textLabelConfig4) local buttonInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) local onGoal = { Position = UDim2.fromScale(0.5, 0), BackgroundColor3 = Color3.fromRGB(57, 255, 20) } local offGoal = { Position = UDim2.fromScale(0, 0), BackgroundColor3 = Color3.fromRGB(255, 91, 91) } meshButton.MouseButton1Click:Connect(function() clickSound:Play() if cubeIsUsingMesh() then tweenObject(meshButton, buttonInfo, offGoal) usingMesh(false, cubeConfig) else tweenObject(meshButton, buttonInfo, onGoal) usingMesh(true, cubeConfig) end end) moveButton.MouseButton1Click:Connect(function() clickSound:Play() if cubeIsMoving(myCube) then tweenObject(moveButton, buttonInfo, offGoal) moving(false) else tweenObject(moveButton, buttonInfo, onGoal) moving(true) end end) voidButton.MouseButton1Click:Connect(function() clickSound:Play() if void then tweenObject(voidButton, buttonInfo, offGoal) void = false else tweenObject(voidButton, buttonInfo, onGoal) void = true end end) banishButton.MouseButton1Click:Connect(function() clickSound:Play() if banish then tweenObject(banishButton, buttonInfo, offGoal) banish = false clearTables() else tweenObject(banishButton, buttonInfo, onGoal) banish = true end end) parallelButton.MouseButton1Click:Connect(function() clickSound:Play() if parallel then tweenObject(parallelButton, buttonInfo, offGoal) parallel = false else tweenObject(parallelButton, buttonInfo, onGoal) parallel = true end end) extendButton.MouseButton1Click:Connect(function() clickSound:Play() if extended then tweenObject(extendButton, buttonInfo, offGoal) sizeInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) local tweenSize = (shrink and Vector3.new(1, 1, 1) or CUBESIZE) cubeConfig.Size = tweenSize tweenCube(myCube, sizeInfo, {Size = cubeConfig.Size}) extended = false sizeInfo = TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out) else tweenObject(extendButton, buttonInfo, onGoal) sizeInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) local tweenSize = (shrink and Vector3.new(1, 1, 500) or EXTENDSIZE) cubeConfig.Size = tweenSize tweenCube(myCube, sizeInfo, {Size = cubeConfig.Size}) extended = true sizeInfo = TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out) end end) shrinkButton.MouseButton1Click:Connect(function() clickSound:Play() if shrink then tweenObject(shrinkButton, buttonInfo, offGoal) local tweenSize = (extended and Vector3.new(2.5, 2.5, 500) or CUBESIZE) cubeConfig.Size = tweenSize tweenCube(myCube, sizeInfo, {Size = cubeConfig.Size}) shrink = false else tweenObject(shrinkButton, buttonInfo, onGoal) local tweenSize = (extended and Vector3.new(1, 1, 500) or Vector3.one) cubeConfig.Size = tweenSize tweenCube(myCube, sizeInfo, {Size = cubeConfig.Size}) shrink = true end end) snAddButton.MouseButton1Click:Connect(function() clickSound:Play() snLevel = math.clamp(snLevel + 50, 0, 19980) snLevelNumLabel.Text = snLevel end) snMinusButton.MouseButton1Click:Connect(function() clickSound:Play() snLevel = math.clamp(snLevel - 50, 0, 19980) snLevelNumLabel.Text = snLevel end) stallAddButton.MouseButton1Click:Connect(function() clickSound:Play() stallLevel = math.clamp(stallLevel + 50, 0, 1000) stallLevelNumLabel.Text = stallLevel end) stallMinusButton.MouseButton1Click:Connect(function() clickSound:Play() stallLevel = math.clamp(stallLevel - 50, 0, 1000) stallLevelNumLabel.Text = stallLevel end) local function updateFPSCounter(deltaTime) currentPhysicsFPS = math.round(workspace:GetRealPhysicsFPS()) currentServerFPS = math.round(1 / deltaTime) physFPSNumLabel.Text = currentPhysicsFPS serverFPSNumLabel.Text = currentServerFPS end coroutine.resume(coroutine.create(function() RunService.Heartbeat:Connect(updateFPSCounter) end)) createUICorner(mainFrame, 0.08) createUICorner(meshButtonHolder, 1) createUICorner(moveButtonHolder, 1) createUICorner(voidButtonHolder, 1) createUICorner(banishButtonHolder, 1) createUICorner(parallelButtonHolder, 1) createUICorner(extendButtonHolder, 1) createUICorner(shrinkButtonHolder, 1) createUICorner(meshButton, 1) createUICorner(moveButton, 1) createUICorner(voidButton, 1) createUICorner(banishButton, 1) createUICorner(parallelButton, 1) createUICorner(extendButton, 1) createUICorner(shrinkButton, 1) end createGui(myGui) local function moveCube(deltaTime) if not cubeIsMoving() then return end local success, result = xpcall(function() lastPlayerCFrame = playerHumanoidRootPart.CFrame cubeOffset = lastPlayerCFrame * CFRAMEOFFSET lerpCube(cube, cubeOffset, deltaTime) end, function(error) warn("Error while moving cube: ", error) end) end local function voidTouchingParts() if not void then return end local success, result = xpcall(function() bootlegSN(snLevel, function() stall(stallLevel, function() local partsInArea = getPartsInCubeArea(cube) local excludedParts = { "Baseplate", "Base", "Terrain", } for _, partInArea in pairs(partsInArea) do if not excludedParts[partInArea.Name] then if not partInArea:IsDescendantOf(playerCharacter) then partInArea.Name = "Cubed" partInArea.Position = VOIDPOSITION partInArea.Size = Vector3.new(0/0, 0/0, 0/0) partInArea.Transparency = 1 partInArea.CFrame = CFrame.new(0/0, 0/0, 0/0) partInArea:BreakJoints() partInArea:ClearAllChildren() banishTable[partInArea.Name] = { parentName = partInArea.Parent.Name } end end end end) end) end, function(error) warn("Error while voiding part, Error: ", error) end) end local function banish(instance) if not banish then return end local success, result = xpcall(function() bootlegSN(snLevel, function() stall(stallLevel, function() local partInfo = banishTable[instance.Name] if partInfo then if partInfo.parentName == instance.Parent.Name then instance.Position = VOIDPOSITION instance.Size = Vector3.new(0/0, 0/0, 0/0) instance.Transparency = 1 instance.CFrame = CFrame.new(0/0, 0/0, 0/0) instance:BreakJoints() instance:ClearAllChildren() warn("Banished: ", instance.Name) end end end) end) end, function(error) warn("Error while banishing part: ", error) end) end tweenpriority(function() bootlegSN(snLevel, function() dynamicParallel(workspace, "DescendantAdded", banish) end) end) local function refitCube() if not workspace:FindFirstChild(randomString) or #myCube:GetDescendants() ~= 1 then bootlegSN(snLevel, function() stall(stallLevel, function() if myCube then myCube:Destroy() end lastPlayerCFrame = playerHumanoidRootPart.CFrame cubeOffset = lastPlayerCFrame * CFRAMEOFFSET cubeConfig.CFrame = cubeOffset myCube = createCube(cubeConfig) connectCubeEvents() randomString = randomStr() randomString2 = randomStr() myCube.Name = randomString if useMesh then local cubeMesh = myCube:FindFirstChildOfClass("SpecialMesh") cubeMesh.Name = randomString2 end end) end) end end local function propertyStuff() myCube.Transparency = 0 myCube.Material = Enum.Material.Plastic myCube.BrickColor = BrickColor.new("Medium stone grey") myCube.Anchored = true myCube.CanCollide = cubeConfig.CanCollide myCube.CanTouch = cubeConfig.CanTouch myCube.CanQuery = cubeConfig.CanQuery if tweening then return end myCube.Size = cubeConfig.Size end local function randomStuff(deltaTime) refitCube() voidTouchingParts() moveCube(deltaTime) propertyStuff() end player.CharacterAdded:Connect(function(character) playerCharacter = character playerHumanoidRootPart = playerCharacter.HumanoidRootPart lastPlayerCFrame = playerHumanoidRootPart.CFrame end) RunService.Heartbeat:Connect(function(deltaTime) randomStuff(deltaTime) end)
Editor Settings
Theme
Key bindings
Full width
Lines