What's new
Heapleak - Scripthub

Get the most out of HeapLeak by creating a free account! Once signed in, you’ll gain full access to restricted content, be able to share your own scripts, and participate in our member-only discussions.

Btools by @MarianaeGaby v1.0

Version / Update: v1.0.0
Download / Script Link
local P=game:GetService("Players")
local R=game:GetService("RunService")
local W=game:GetService("Workspace")
local G=game:GetService("CoreGui")
local U=game:GetService("UserInputService")
local LP=P.LocalPlayer
local M=LP:GetMouse()
local C=W.CurrentCamera
local PG=LP:WaitForChild("PlayerGui")

local moveBase,scaleBase,minSize=0.12,0.08,0.2
local gizmo=Instance.new("Model");gizmo.Name="F3XGizmo"
local sel,dragAxis,prev2,clickCount={},nil,nil,{}
local mode="None";local toolEquipped=false
local camLocked=false;local savedType,savedCFrame

local aura=Instance.new("Highlight");aura.DepthMode=Enum.HighlightDepthMode.AlwaysOnTop
aura.FillColor=Color3.fromRGB(255,255,0);aura.OutlineColor=aura.FillColor;aura.FillTransparency=0.8;aura.Enabled=false;aura.Parent=G

local arrows={}
local function mkArrow(col,name,size)
local p=Instance.new("Part");p.Size=size;p.Anchored=true;p.CanCollide=false;p.Color=col;p.Material=Enum.Material.Neon
p.Name=name.."Arrow";p.Parent=gizmo;p.Locked=true;p.CanQuery=true
local h=Instance.new("Highlight",p);h.DepthMode=Enum.HighlightDepthMode.AlwaysOnTop;h.FillColor=col;h.OutlineColor=Color3.new(1,1,1);h.FillTransparency=0.5
arrows[#arrows+1]=p;return p
end
local xA=mkArrow(Color3.fromRGB(255,0,0),"X",Vector3.new(4,0.6,0.6))
local xNA=mkArrow(Color3.fromRGB(0,0,255),"XNeg",Vector3.new(4,0.6,0.6))
local yA=mkArrow(Color3.fromRGB(0,255,0),"Y",Vector3.new(0.6,4,0.6))
local yNA=mkArrow(Color3.fromRGB(0,0,255),"YNeg",Vector3.new(0.6,4,0.6))
local zA=mkArrow(Color3.fromRGB(0,0,255),"Z",Vector3.new(0.6,0.6,4))
local zNA=mkArrow(Color3.fromRGB(0,0,255),"ZNeg",Vector3.new(0.6,0.6,4))
xNA.Transparency=1;xNA.CanQuery=false;yNA.Transparency=1;yNA.CanQuery=false;zNA.Transparency=1;zNA.CanQuery=false

local UI=Instance.new("ScreenGui");UI.Name="F3X_UI";UI.Parent=G;UI.Enabled=false
local function btn(parent,pos,on,off) local b=Instance.new("ImageButton");b.Size=UDim2.new(0,50,0,50);b.Position=pos;b.BackgroundTransparency=1
b.Image="rbxassetid://"..off;b:SetAttribute("ON","rbxassetid://"..on);b:SetAttribute("OFF","rbxassetid://"..off);b.Parent=parent;return b end
local bMove=btn(UI,UDim2.new(1,-60,0,10),76187922695895,79928333977175)
local bScale=btn(UI,UDim2.new(1,-120,0,10),119883270344006,98508993513225)
local bColor=btn(UI,UDim2.new(0.5,-25,0,10),137585487907964,108458428719257)
local bNPC=btn(UI,UDim2.new(1,-60,0,70),106044472707767,106834379822510)
local bCreate=btn(UI,UDim2.new(1,-120,0,70),75755743296466,87638492118059)
local bRot=btn(UI,UDim2.new(1,-180,0,10),74393243573461,77842655967481)

local cmenu=Instance.new("Frame",UI);cmenu.Size=UDim2.new(0,160,0,160);cmenu.Position=UDim2.new(1,-290,0,70);cmenu.BackgroundColor3=Color3.fromRGB(30,30,30);cmenu.Visible=false
local function smallBtn(txt) local b=Instance.new("TextButton",cmenu);b.Size=UDim2.new(0,140,0,30);b.BackgroundColor3=Color3.fromRGB(50,50,50);b.Text=txt;Instance.new("UICorner",b);return b end
local bQ,bB,bC,bCo=smallBtn("Quadrado"),smallBtn("Esfera"),smallBtn("Cilindro"),smallBtn("Cone")
local shape="Quadrado"
bQ.MouseButton1Click:Connect(function() shape="Quadrado" end)
bB.MouseButton1Click:Connect(function() shape="Esfera" end)
bC.MouseButton1Click:Connect(function() shape="Cilindro" end)
bCo.MouseButton1Click:Connect(function() shape="Cone" end)

local function moveVis() xA.Color=Color3.fromRGB(255,0,0);yA.Color=Color3.fromRGB(0,255,0);zA.Color=Color3.fromRGB(0,0,255)
xNA.Transparency=1;xNA.CanQuery=false;yNA.Transparency=1;yNA.CanQuery=false;zNA.Transparency=1;zNA.CanQuery=false end
local function scaleVis() local b=Color3.fromRGB(0,0,255) xA.Color=b;yA.Color=b;zA.Color=b;xNA.Color=b;yNA.Color=b;zNA.Color=b
xNA.Transparency=0;xNA.CanQuery=true;yNA.Transparency=0;yNA.CanQuery=true;zNA.Transparency=0;zNA.CanQuery=true end

local function upd()
if sel and sel.Parent and (mode=="Move" or mode=="Scale") then
gizmo.Parent=W;aura.Adornee=sel;aura.Enabled=true
local s=sel.Size;local c=sel.CFrame
xA.CFrame=c*CFrame.new(s.X/2+1,0,0);xNA.CFrame=c*CFrame.new(-(s.X/2+1),0,0)
yA.CFrame=c*CFrame.new(0,s.Y/2+1,0);yNA.CFrame=c*CFrame.new(0,-(s.Y/2+1),0)
zA.CFrame=c*CFrame.new(0,0,s.Z/2+1);zNA.CFrame=c*CFrame.new(0,0,-(s.Z/2+1))
else gizmo.Parent=nil;aura.Enabled=false;dragAxis=nil;prev2=nil end
end
R.RenderStepped:Connect(upd)
R.RenderStepped:Connect(function() if camLocked and savedCFrame then pcall(function() C.CFrame=savedCFrame end) end end)

M.Button1Down:Connect(function()
if mode=="Create" then return end
local t=M.Target
if t and t:IsA("BasePart") and t.Parent~=gizmo then
clickCount[t]=(clickCount[t] or 0)+1
if clickCount[t]>=3 then sel=t;aura.Adornee=t;aura.Enabled=true;gizmo.Parent=W;clickCount={}
if mode=="Color" and _G.F3X_Color and _G.F3X_Color.Show then _G.F3X_Color.Show() end
end
end
end)

local rp=RaycastParams.new();rp.FilterType=Enum.RaycastFilterType.Whitelist;rp.FilterDescendantsInstances=arrows
local function arrowUnder()
local r=C:ScreenPointToRay(M.X,M.Y)
local res=W:Raycast(r.Origin,r.Direction*9999,rp)
return res and res.Instance
end

local function lockCam() if camLocked then return end;savedType=C.CameraType;savedCFrame=C.CFrame;camLocked=true;C.CameraType=Enum.CameraType.Script;pcall(function() C.CFrame=savedCFrame end) end
local function unlockCam() if not camLocked then return end;camLocked=false;if savedCFrame then pcall(function() C.CFrame=savedCFrame end) end; if savedType then pcall(function() C.CameraType=savedType end) end;savedType=nil;savedCFrame=nil end

M.Button1Down:Connect(function()
if not sel then return end
if not (mode=="Move" or mode=="Scale") then return end
local t=arrowUnder()
if not t or t.Parent~=gizmo then return end
if mode=="Move" and t.Name:find("Neg") then return end
dragAxis=t.Name;prev2=Vector2.new(M.X,M.Y);lockCam()
end)
M.Button1Up:Connect(function() dragAxis=nil;prev2=nil;unlockCam() end)

local function axisDir(p,a) local s=(a:find("Neg") and -1) or 1;local cf=p.CFrame;if a:sub(1,1)=="X" then return cf.RightVector*s elseif a:sub(1,1)=="Y" then return cf.UpVector*s else return cf.LookVector*s end end
local function studsPerPixel(pos,base)local d=(C.CFrame.Position-pos).Magnitude;return base*(d/50) end
local function axis2D(pos,dir)local p1=C:WorldToViewportPoint(pos);local p2=C:WorldToViewportPoint(pos+dir);local v=Vector2.new(p2.X-p1.X,p2.Y-p1.Y);if v.Magnitude<1e-4 then return Vector2.new(1,0) end;return v.Unit end

R.RenderStepped:Connect(function()
if not (sel and dragAxis and prev2) then return end
if not (mode=="Move" or mode=="Scale") then return end
local cur=Vector2.new(M.X,M.Y);local pd=cur-prev2;prev2=cur;if pd.Magnitude==0 then return end
local c=sel.Position;local d3=axisDir(sel,dragAxis);local a2=axis2D(c,d3);local spix=a2:Dot(pd)
if mode=="Move" then local sp=studsPerPixel(c,moveBase);sel.Position=sel.Position+(d3*spix*sp)
else local sp=studsPerPixel(c,scaleBase);local ch=spix*sp;local sx,sy,sz=sel.Size.X,sel.Size.Y,sel.Size.Z;local dx,dy,dz=0,0,0;local f=dragAxis:sub(1,1)
if f=="X" then sx=math.max(sx+ch,minSize);dx=ch/2
elseif f=="Y" then sy=math.max(sy+ch,minSize);dy=ch/2
else sz=math.max(sz+ch,minSize);dz=ch/2 end
sel.Size=Vector3.new(sx,sy,sz);sel.Position=sel.Position+(d3*(dx+dy+dz))
end
end)

local tool=Instance.new("Tool");tool.Name="F3XTool";tool.RequiresHandle=true;tool.TextureId="rbxassetid://113308335065660";tool.Parent=LP:WaitForChild("Backpack")
local handle=Instance.new("Part",tool);handle.Name="Handle";handle.Size=Vector3.new(1,1,1);handle.Material=Enum.Material.SmoothPlastic;handle.Color=Color3.fromRGB(230,230,230)

local INHAND="rbxassetid://73365062073057";local hand=nil;local keep=nil
local function applyDecals(p,t)
if not p then return end
for _,c in ipairs(p:GetChildren()) do if c:IsA("Decal") then c:Destroy() end end
local faces={Enum.NormalId.Top,Enum.NormalId.Bottom,Enum.NormalId.Left,Enum.NormalId.Right,Enum.NormalId.Front,Enum.NormalId.Back}
for _,f in ipairs(faces) do local d=Instance.new("Decal",p);d.Texture=t;d.Face=f end
end
local function ensureHand()
if hand and hand.Parent then for _,d in ipairs(hand:GetChildren()) do if d:IsA("Decal") and d.Texture~=INHAND then d.Texture=INHAND end end end
end

tool.Equipped:Connect(function()
toolEquipped=true;UI.Enabled=true
if not hand or not hand.Parent then hand=Instance.new("Part",tool);hand.Name="F3X_InHand";hand.Size=Vector3.new(1.5,1.5,1.5);hand.Material=Enum.Material.SmoothPlastic;hand.Color=Color3.new(1,1,1);hand.CanCollide=false;applyDecals(hand,INHAND)
local w=Instance.new("WeldConstraint",hand);w.Part0=handle;w.Part1=hand;hand.CFrame=handle.CFrame*CFrame.new(0,0,-1.5) else applyDecals(hand,INHAND) end
if keep then keep:Disconnect() end;keep=R.Heartbeat:Connect(ensureHand)
mode="None";bMove.Image=bMove:GetAttribute("OFF");bScale.Image=bScale:GetAttribute("OFF");bCreate.Image=bCreate:GetAttribute("OFF")
bColor.Image=bColor:GetAttribute("OFF");bNPC.Image=bNPC:GetAttribute("OFF");bRot.Image=bRot:GetAttribute("OFF");cmenu.Visible=false
if _G.F3X_Color and _G.F3X_Color.Hide then _G.F3X_Color.Hide() end
if _G.F3X_NPC_Module and _G.F3X_NPC_Module.Hide then _G.F3X_NPC_Module.Hide() end
if delta_disable then pcall(delta_disable) end
end)
tool.Unequipped:Connect(function()
toolEquipped=false;UI.Enabled=false;sel=nil;dragAxis=nil;prev2=nil;mode="None";cmenu.Visible=false;gizmo.Parent=nil;aura.Enabled=false
if keep then keep:Disconnect();keep=nil end
if _G.F3X_NPC_Module and _G3.F3X_NPC_Module.Hide then pcall(_G.F3X_NPC_Module.Hide) end
if _G.F3X_Color and _G.F3X_Color.Hide then _G.F3X_Color.Hide() end
unlockCam()
if delta_disable then pcall(delta_disable) end
end)

local function setBtnsDefault() bMove.Image=bMove:GetAttribute("OFF");bScale.Image=bScale:GetAttribute("OFF");bCreate.Image=bCreate:GetAttribute("OFF")
bColor.Image=bColor:GetAttribute("OFF");bRot.Image=bRot:GetAttribute("OFF");cmenu.Visible=false end
local function setMode(m) if m=="Move" then moveVis() elseif m=="Scale" then scaleVis() end;mode=m end

bMove.MouseButton1Click:Connect(function() if delta_disable then pcall(delta_disable) end if mode=="Move" then mode="None";setBtnsDefault() else setBtnsDefault();bMove.Image=bMove:GetAttribute("ON");setMode("Move") end end)
bScale.MouseButton1Click:Connect(function() if delta_disable then pcall(delta_disable) end if mode=="Scale" then mode="None";setBtnsDefault() else setBtnsDefault();bScale.Image=bScale:GetAttribute("ON");setMode("Scale") end end)
bCreate.MouseButton1Click:Connect(function() if delta_disable then pcall(delta_disable) end if mode=="Create" then mode="None";setBtnsDefault() else setBtnsDefault();bCreate.Image=bCreate:GetAttribute("ON");mode="Create";cmenu.Visible=true end end)

local function spawn(shape,pos)
local p=Instance.new("Part");p.Anchored=true;p.Material=Enum.Material.SmoothPlastic;p.Color=Color3.new(1,1,1);p.Size=Vector3.new(4,4,4);p.Name="F3X_Created_"..shape;p.CFrame=CFrame.new(pos.X,pos.Y+2,pos.Z);p.Parent=W
for _,c in ipairs(p:GetChildren()) do if c:IsA("Decal") or c:IsA("SurfaceAppearance") then c:Destroy() end end
if shape=="Quadrado" then p.Shape=Enum.PartType.Block
elseif shape=="Esfera" then p.Shape=Enum.PartType.Ball
elseif shape=="Cilindro" then p.Shape=Enum.PartType.Cylinder
else p.Shape=Enum.PartType.Block;local m=Instance.new("SpecialMesh",p);m.MeshType=Enum.MeshType.FileMesh;m.MeshId="rbxassetid://1033714";m.Scale=Vector3.new(2,4,2) end
return p
end

M.Button1Down:Connect(function() if mode~="Create" then return end local h=M.Hit;if not h then return end sel=spawn(shape,h.Position);setBtnsDefault();bMove.Image=bMove:GetAttribute("ON");setMode("Move") end)

if not _G.F3X_NPC_Module then _G.F3X_NPC_Module={} end
do
local gui=Instance.new("ScreenGui",G);gui.Name="F3X_NPC_GUI";gui.Enabled=false
local box=Instance.new("TextBox",gui);box.Size=UDim2.new(0,200,0,36);box.Position=UDim2.new(0.02,0,0.75,0);box.PlaceholderText="Nick do jogador"
local cbtn=Instance.new("TextButton",gui);cbtn.Size=UDim2.new(0,200,0,36);cbtn.Position=UDim2.new(0.02,0,0.81,0);cbtn.Text="Clonar"
local control=Instance.new("TextButton",gui);control.Size=UDim2.new(0,150,0,36);control.Position=UDim2.new(0.02,0,0.87,0);control.Text="Controlar?";control.Visible=false
local stop=Instance.new("TextButton",gui);stop.Size=UDim2.new(0,150,0,36);stop.Position=UDim2.new(0.02,0,0.87,0);stop.Text="Parar";stop.Visible=false
local up=Instance.new("TextButton",gui);up.Size=UDim2.new(0,50,0,50);up.Position=UDim2.new(0.95,0,0.12,0);up.AnchorPoint=Vector2.new(1,0);up.Text="🔼";up.Visible=false
local jump=Instance.new("TextButton",gui);jump.Size=UDim2.new(0,50,0,50);jump.Position=UDim2.new(0.95,0,0.24,0);jump.AnchorPoint=Vector2.new(1,0);jump.Text="🆙️";jump.Visible=false
local clones={};local controlled=nil;local mv=Vector3.new(0,0,0);local conns={}

local function clear() for _,c in ipairs(conns) do pcall(function() c:Disconnect() end) end;conns={} end
local function cloneNick(nick) if not nick or nick=="" then return end;local ok,u=pcall(function() return P:GetUserIdFromNameAsync(nick) end) if not ok or not u then return end
local ok2,desc=pcall(function() return P:GetHumanoidDescriptionFromUserId(u) end) if not ok2 or not desc then return end
local ch=LP.Character or LP.CharacterAdded:Wait();local root=ch:WaitForChild("HumanoidRootPart");local m=P:CreateHumanoidModelFromDescription(desc,Enum.HumanoidRigType.R15);m.Name="Clone_"..nick;m.Parent=W;m:PivotTo(root.CFrame*CFrame.new(3,0,0));table.insert(clones,m);m:SetAttribute("F3XClone",true)
end
local movConn=nil
local function startMove() if movConn then return end;movConn=R.RenderStepped:Connect(function() if controlled then local h=controlled:FindFirstChildOfClass("Humanoid");if h then h:Move(mv,true) end end end);table.insert(conns,movConn) end
local function stopMove() if movConn then pcall(function() movConn:Disconnect() end);movConn=nil end end

local function onClick() if not gui.Enabled then return end;local t=M.Target;if not t then return end;local a=t
while a and a~=W do if a:IsA("Model") and (a:GetAttribute("F3XClone") or tostring(a.Name):match("^Clone_")) then controlled=a;control.Visible=true;return end;a=a.Parent end
end

function _G.F3X_NPC_Module.Show()
gui.Enabled=true;clear()
table.insert(conns,cbtn.MouseButton1Click:Connect(function() cloneNick(box.Text) end))
local cl=M.Button1Down:Connect(onClick);table.insert(conns,cl)
table.insert(conns,control.MouseButton1Click:Connect(function() if not controlled then return end;control.Visible=false;stop.Visible=true;box.Visible=false;cbtn.Visible=false;up.Visible=true;jump.Visible=true;local h=controlled:FindFirstChildOfClass("Humanoid");if h then W.CurrentCamera.CameraSubject=h end;startMove() end))
table.insert(conns,stop.MouseButton1Click:Connect(function() controlled=nil;mv=Vector3.new(0,0,0);control.Visible=false;stop.Visible=false;box.Visible=true;cbtn.Visible=true;up.Visible=false;jump.Visible=false;local h=LP.Character and LP.Character:FindFirstChildOfClass("Humanoid");if h then W.CurrentCamera.CameraSubject=h end;stopMove() end))
table.insert(conns,up.MouseButton1Down:Connect(function() if controlled then mv=Vector3.new(0,0,-1) end end))
table.insert(conns,up.MouseButton1Up:Connect(function() mv=Vector3.new(0,0,0) end))
table.insert(conns,up.MouseLeave:Connect(function() mv=Vector3.new(0,0,0) end))
table.insert(conns,jump.MouseButton1Click:Connect(function() if controlled then local h=controlled:FindFirstChildOfClass("Humanoid");if h then h:ChangeState(Enum.HumanoidStateType.Jumping) end end end))
control.Visible=false;stop.Visible=false;up.Visible=false;jump.Visible=false;box.Visible=true;cbtn.Visible=true;bNPC.Image=bNPC:GetAttribute("ON");npcOn=true
end
function _G.F3X_NPC_Module.Hide() gui.Enabled=false;clear();controlled=nil;mv=Vector3.new(0,0,0);control.Visible=false;stop.Visible=false;up.Visible=false;jump.Visible=false;box.Visible=true;cbtn.Visible=true;stopMove();local h=LP.Character and LP.Character:FindFirstChildOfClass("Humanoid");if h then W.CurrentCamera.CameraSubject=h end;bNPC.Image=bNPC:GetAttribute("OFF");npcOn=false end
end

local npcOn=false
bNPC.MouseButton1Click:Connect(function() if delta_disable then pcall(delta_disable) end if npcOn then if _G.F3X_NPC_Module and _G.F3X_NPC_Module.Hide then _G.F3X_NPC_Module.Hide() end else if _G.F3X_NPC_Module and _G.F3X_NPC_Module.Show then _G.F3X_NPC_Module.Show() end end end)

if not _G.F3X_Color then _G.F3X_Color={} end
do
local SG=Instance.new("ScreenGui",PG);SG.Name="F3X_Color";SG.Enabled=false
local Pnl=Instance.new("Frame",SG);Pnl.Size=UDim2.new(0,220,0,140);Pnl.Position=UDim2.new(0,10,0,10);Pnl.BackgroundColor3=Color3.fromRGB(30,30,30)
local disp=Instance.new("Frame",Pnl);disp.Size=UDim2.new(0,60,0,60);disp.Position=UDim2.new(0,10,0,10);disp.BorderSizePixel=1
local rBox=Instance.new("TextBox",Pnl);rBox.Position=UDim2.new(0,80,0,10);rBox.Size=UDim2.new(0,120,0,24);rBox.PlaceholderText="R 0-255"
local gBox=Instance.new("TextBox",Pnl);gBox.Position=UDim2.new(0,80,0,40);gBox.Size=UDim2.new(0,120,0,24);gBox.PlaceholderText="G 0-255"
local bBox=Instance.new("TextBox",Pnl);bBox.Position=UDim2.new(0,80,0,70);bBox.Size=UDim2.new(0,120,0,24);bBox.PlaceholderText="B 0-255"
local apply=Instance.new("TextButton",Pnl);apply.Size=UDim2.new(0,100,0,24);apply.Position=UDim2.new(0,10,0,100);apply.Text="Aplicar"
local close=Instance.new("TextButton",Pnl);close.Size=UDim2.new(0,100,0,24);close.Position=UDim2.new(0,110,0,100);close.Text="Fechar"
local function toColor() local r=tonumber(rBox.Text) or 255;local g=tonumber(gBox.Text) or 255;local b=tonumber(bBox.Text) or 255;return Color3.fromRGB(math.clamp(r,0,255),math.clamp(g,0,255),math.clamp(b,0,255)) end
apply.MouseButton1Click:Connect(function() if sel and sel:IsA("BasePart") then local c=toColor();sel.Color=c;for _,ch in ipairs(sel:GetChildren()) do if ch:IsA("Decal") or ch:IsA("SurfaceAppearance") then pcall(function() ch:Destroy() end) end end end end)
close.MouseButton1Click:Connect(function() SG.Enabled=false end)
function _G.F3X_Color.Show() if delta_disable then pcall(delta_disable) end SG.Enabled=true if sel and sel:IsA("BasePart") then local r,g,b=math.floor(sel.Color.R*255),math.floor(sel.Color.G*255),math.floor(sel.Color.B*255);rBox.Text=tostring(r);gBox.Text=tostring(g);bBox.Text=tostring(b) else rBox.Text="255";gBox.Text="255";bBox.Text="255" end end
function _G.F3X_Color.Hide() SG.Enabled=false end
end

bColor.MouseButton1Click:Connect(function() if delta_disable then pcall(delta_disable) end if mode=="Color" then mode="None";setBtnsDefault();if _G.F3X_Color and _G.F3X_Color.Hide then _G.F3X_Color.Hide() end else setBtnsDefault();bColor.Image=bColor:GetAttribute("ON");mode="Color";if sel and _G.F3X_Color and _G.F3X_Color.Show then _G.F3X_Color.Show() end end end)

R.Heartbeat:Connect(function() if camLocked and (not sel or not sel.Parent) then unlockCam() end end)

-- Delta rotator
local dSeg=24;local dRadM=1.2;local dTh=0.25;local dLen=0.8;local dSens=0.006
local dSel=nil;local dModel=nil;local dDrag=nil;local dRot=false;local dConns={};local dOn=false;local dAura

local function dAddAura(p) if not p then return end if not dAura or not dAura.Parent then dAura=Instance.new("Highlight",G);dAura.Name="DeltaAura";dAura.FillTransparency=0.8;dAura.OutlineColor=Color3.fromRGB(0,255,255);dAura.FillColor=dAura.OutlineColor;dAura.DepthMode=Enum.HighlightDepthMode.AlwaysOnTop;end;dAura.Adornee=p;dAura.Enabled=true end
local function dSetAura(rot) if dAura then if rot then dAura.OutlineColor=Color3.fromRGB(0,200,0);dAura.FillColor=dAura.OutlineColor else dAura.OutlineColor=Color3.fromRGB(0,255,255);dAura.FillColor=dAura.OutlineColor end end end
local function dRemAura() if dAura then pcall(function() dAura.Enabled=false;dAura.Adornee=nil end) end end
local function dDestroy() if dModel then pcall(function() dModel:Destroy() end);dModel=nil end;dRemAura() end
local function dRestoreCam() local ch=LP.Character if ch and ch:FindFirstChild("Humanoid") then C.CameraType=Enum.CameraType.Custom;C.CameraSubject=ch.Humanoid;U.MouseBehavior=Enum.MouseBehavior.Default end end

local function dCreateRing(p,axis,col)
if not p then return end
local m=Instance.new("Model",dModel);m.Name="Ring"..axis
local radius=math.max(p.Size.X,p.Size.Y,p.Size.Z)*dRadM
for i=1,dSeg do
local t=(i-1)/dSeg*2*math.pi
local s=Instance.new("Part");s.Anchored=true;s.CanCollide=false;s.CanQuery=true;s.Size=Vector3.new(dTh,dLen,dTh);s.Color=col;s.Material=Enum.Material.Neon;s.Name=axis.."seg"..i;s.Parent=m;s:SetAttribute("Axis",axis)
local cf=p.CFrame;local wp,tn
if axis=="X" then wp=p.Position+cf.UpVector*math.cos(t)*radius+cf.LookVector*math.sin(t)*radius;tn=(-math.sin(t)*cf.UpVector)+(math.cos(t)*cf.LookVector)
elseif axis=="Y" then wp=p.Position+cf.RightVector*math.cos(t)*radius+cf.LookVector*math.sin(t)*radius;tn=(-math.sin(t)*cf.RightVector)+(math.cos(t)*cf.LookVector)
else wp=p.Position+cf.RightVector*math.cos(t)*radius+cf.UpVector*math.sin(t)*radius;tn=(-math.sin(t)*cf.RightVector)+(math.cos(t)*cf.UpVector) end
s.CFrame=CFrame.new(wp,wp+tn)*CFrame.Angles(math.pi/2,0,0)
end
end

local function dCreateFor(p) dDestroy();dModel=Instance.new("Model",W);dModel.Name="DeltaRot";dCreateRing(p,"X",Color3.fromRGB(255,0,0));dCreateRing(p,"Y",Color3.fromRGB(0,255,0));dCreateRing(p,"Z",Color3.fromRGB(0,120,255));dAddAura(p) end

local function dUpdater()
local c=R.RenderStepped:Connect(function()
if dModel and dSel then
for _,ch in pairs(dModel:GetChildren()) do for _,seg in pairs(ch:GetChildren()) do local axis=seg:GetAttribute("Axis") if axis then local idx=tonumber(seg.Name:match("%d+")) or 1 local t=(idx-1)/dSeg*2*math.pi local cf=dSel.CFrame local rad=math.max(dSel.Size.X,dSel.Size.Y,dSel.Size.Z)*dRadM local wp,tn
if axis=="X" then wp=dSel.Position+cf.UpVector*math.cos(t)*rad+cf.LookVector*math.sin(t)*rad;tn=(-math.sin(t)*cf.UpVector)+(math.cos(t)*cf.LookVector)
elseif axis=="Y" then wp=dSel.Position+cf.RightVector*math.cos(t)*rad+cf.LookVector*math.sin(t)*rad;tn=(-math.sin(t)*cf.RightVector)+(math.cos(t)*cf.LookVector)
else wp=dSel.Position+cf.RightVector*math.cos(t)*rad+cf.UpVector*math.sin(t)*rad;tn=(-math.sin(t)*cf.RightVector)+(math.cos(t)*cf.UpVector) end
seg.CFrame=CFrame.new(wp,wp+tn)*CFrame.Angles(math.pi/2,0,0) end end end
end
end)
table.insert(dConns,c)
end

local function dStartDrag(a) dDrag=a;dRot=false end
local function dStopDrag() if dRot then dSetAura(false);dRestoreCam() end;dDrag=nil;dRot=false end

local function dMouseDown()
if not dOn then return end
local t=M.Target
if t and t:GetAttribute("Axis") then dStartDrag(t:GetAttribute("Axis"));return end
if t and t:IsA("BasePart") then dSel=t;dCreateFor(dSel);dAddAura(dSel) else dSel=nil;dDestroy();dRestoreCam() end
end
local function dInputEnded(i,processed) if not dOn then return end if not processed and i.UserInputType==Enum.UserInputType.MouseButton1 then dStopDrag() end end

local function dRotApplier()
local c=R.RenderStepped:Connect(function()
if dDrag and dSel then
local dd=U:GetMouseDelta()
if dd.Magnitude>0 then
if not dRot then dRot=true;U.MouseBehavior=Enum.MouseBehavior.LockCenter;C.CameraType=Enum.CameraType.Scriptable;dSetAura(true) end
local ang,ax=nil,nil;local p=dSel.Position
if dDrag=="X" then ang=-dd.Y*dSens;ax=dSel.CFrame.RightVector.Unit
elseif dDrag=="Y" then ang=dd.X*dSens;ax=dSel.CFrame.UpVector.Unit
else ang=dd.X*dSens;ax=dSel.CFrame.LookVector.Unit end
if ax then dSel.CFrame=CFrame.new(p)*CFrame.fromAxisAngle(ax,ang)*CFrame.new(-p)*dSel.CFrame end
end
end
end)
table.insert(dConns,c)
end

function delta_enable()
if dOn then return end;dOn=true;setBtnsDefault();bRot.Image=bRot:GetAttribute("ON");mode="Rotate";dDestroy();dSel=nil;dDrag=nil;dRot=false
table.insert(dConns,M.Button1Down:Connect(dMouseDown));table.insert(dConns,U.InputEnded:Connect(dInputEnded));dUpdater();dRotApplier()
end
function delta_disable()
if not dOn then return end;dOn=false;bRot.Image=bRot:GetAttribute("OFF");mode="None"
for _,c in ipairs(dConns) do pcall(function() c:Disconnect() end) end;dConns={}
dDestroy();dSel=nil;dDrag=nil;dRot=false;pcall(dRestoreCam);unlockCam()
end

bRot.MouseButton1Click:Connect(function() if mode=="Rotate" then delta_disable() else setBtnsDefault(); if _G.F3X_NPC_Module and _G.F3X_NPC_Module.Hide then pcall(_G.F3X_NPC_Module.Hide) end if _G.F3X_Color and _G.F3X_Color.Hide then pcall(_G.F3X_Color.Hide) end delta_enable() end end)

LP.CharacterRemoving:Connect(function() delta_disable() end)
R.Heartbeat:Connect(function() if dOn and dRot and (not dSel or not dSel.Parent) then delta_disable() end end)

print("[F3X] Minified script loaded")
[ View More ]
0400229b-906a-4c2e-9e40-472c08ad6e84.webp


A script in which you can build or modify blocks
 
Works on mobile
  1. Yes
Back
Top