Back to Scripts
bfgs admin script BETA

bfgs admin script BETA

ScriptBlox
Universal Free

Game: Universal Script 📌

146 Views
1 Likes
0 Dislikes
aiden_kimble

aiden_kimble

offline

Features

jerk off, noclip, speed, npc spawner ( buggy ), spawn platform, view player, grow, shrink etc

Script Code


local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Debris = game:GetService("Debris")
local UserInputService = game:GetService("UserInputService")
local Lighting = game:GetService("Lighting")
local Workspace = game:GetService("Workspace")

local plr = Players.LocalPlayer
local pg = plr:WaitForChild("PlayerGui")
local backpack = plr:WaitForChild("Backpack")

local defaultWalk = 16
local defaultJump = 50

-- base UI
local sg = Instance.new("ScreenGui")
sg.Name = "AdminGui"
sg.ResetOnSpawn = false
sg.Parent = pg

local frame = Instance.new("Frame", sg)
frame.Size = UDim2.new(0,520,0,140) -- increased height to fit Remove button
frame.Position = UDim2.new(0.5,-260,0,16)
frame.BackgroundColor3 = Color3.fromRGB(24,24,24)
frame.BorderSizePixel = 0
local frameCorner = Instance.new("UICorner", frame)
frameCorner.CornerRadius = UDim.new(0,8)

local input = Instance.new("TextBox", frame)
input.Size = UDim2.new(1,-140,0,48)
input.Position = UDim2.new(0,10,0,10)
input.PlaceholderText = "command (type 'help' or 'cmds')"
input.ClearTextOnFocus = false
input.BackgroundTransparency = 0.18
input.TextColor3 = Color3.new(1,1,1)
input.TextXAlignment = Enum.TextXAlignment.Left
local inputCorner = Instance.new("UICorner", input)
inputCorner.CornerRadius = UDim.new(0,6)

local runBtn = Instance.new("TextButton", frame)
runBtn.Size = UDim2.new(0,116,0,48)
runBtn.Position = UDim2.new(1,-126,0,10)
runBtn.Text = "Run"
runBtn.BackgroundColor3 = Color3.fromRGB(64,64,64)
runBtn.TextColor3 = Color3.new(1,1,1)
local runCorner = Instance.new("UICorner", runBtn)
runCorner.CornerRadius = UDim.new(0,6)

-- Remove button (clears only the textbox)
local removeBtn = Instance.new("TextButton", frame)
removeBtn.Size = UDim2.new(0,116,0,36)
removeBtn.Position = UDim2.new(1,-126,0,62)
removeBtn.Text = "Remove"
removeBtn.BackgroundColor3 = Color3.fromRGB(90,45,45)
removeBtn.TextColor3 = Color3.new(1,1,1)
local removeCorner = Instance.new("UICorner", removeBtn)
removeCorner.CornerRadius = UDim.new(0,6)

local status = Instance.new("TextLabel", frame)
status.Size = UDim2.new(1,-8,0,18)
status.Position = UDim2.new(0,4,1,-18)
status.BackgroundTransparency = 1
status.TextColor3 = Color3.fromRGB(200,200,200)
status.Text = ""
status.TextXAlignment = Enum.TextXAlignment.Left

local function setStatus(t,ttl)
	status.Text = tostring(t or "")
	if ttl and type(ttl)=="number" then
		delay(ttl, function() if status then status.Text = "" end end)
	else
		delay(4, function() if status then status.Text = "" end end)
	end
end

-- helpers
local function findPlayer(q)
	if not q or q == "" then return nil end
	q = q:lower()
	for _,p in pairs(Players:GetPlayers()) do
		if p.Name:lower():find(q,1,true) or (p.DisplayName and p.DisplayName:lower():find(q,1,true)) then
			return p
		end
	end
	return nil
end

local function getChar(p) if not p then return nil end return p.Character end
local function getHum(p) local c = getChar(p) if not c then return nil end return c:FindFirstChildWhichIsA("Humanoid") end
local function getHRP(p) local c = getChar(p) if not c then return nil end return c:FindFirstChild("HumanoidRootPart") end

-- core actions
local function setWalk(n) local h = getHum(plr) if h then h.WalkSpeed = n end end
local function setJump(n) local h = getHum(plr) if h then h.JumpPower = n end end
local function healOne(p) local h = getHum(p) if h then h.Health = h.MaxHealth end end
local function giveTool(name)
	local t = Instance.new("Tool")
	t.Name = name or "FunnyTool"
	local handle = Instance.new("Part")
	handle.Name = "Handle"
	handle.Size = Vector3.new(1,1,1)
	handle.CanCollide = false
	handle.Transparency = 0
	handle.Color = Color3.fromRGB(125,125,125)
	handle.Parent = t
	t.Parent = backpack
	setStatus("Gave tool: "..t.Name)
end

local function spawnPart(name, sizeStr, colorStr)
	local p = Instance.new("Part")
	p.Name = name or "Part"
	local sx,sy,sz = 2,1,2
	if sizeStr then
		local a,b,c = sizeStr:match("^(%-?%d+%.?%d*),(%-?%d+%.?%d*),(%-?%d+%.?%d*)")
		if a then sx,sy,sz = tonumber(a) or sx, tonumber(b) or sy, tonumber(c) or sz end
	end
	p.Size = Vector3.new(sx,sy,sz)
	p.Anchored = true
	local hrp = getHRP(plr)
	if hrp then p.CFrame = hrp.CFrame * CFrame.new(0,0,-6) else p.CFrame = CFrame.new(0,5,0) end
	if colorStr then
		local r,g,b = colorStr:match("^(%d+),(%d+),(%d+)")
		if r then p.Color = Color3.fromRGB(tonumber(r),tonumber(g),tonumber(b)) end
	end
	p.Parent = Workspace
	setStatus("Spawned part "..p.Name)
end

local function toggleInvis()
	local ch = plr.Character
	if not ch then setStatus("No character") return end
	local invis = false
	for _,d in pairs(ch:GetDescendants()) do
		if d:IsA("BasePart") then
			invis = (d.Transparency > 0.5)
			break
		end
	end
	invis = not invis
	for _,d in pairs(ch:GetDescendants()) do
		if d:IsA("BasePart") then
			d.Transparency = invis and 1 or 0
		elseif d:IsA("Decal") then
			d.Transparency = invis and 1 or 0
		end
	end
	setStatus(invis and "Invisible" or "Visible")
end

local function toggleFreeze()
	local hrp = getHRP(plr)
	if not hrp then setStatus("No HRP") return end
	hrp.Anchored = not hrp.Anchored
	setStatus(hrp.Anchored and "Frozen" or "Unfrozen")
end

-- noclip
local noclipConn
local function startNoclip()
	if noclipConn then noclipConn:Disconnect() end
	noclipConn = RunService.Stepped:Connect(function()
		local ch = plr.Character
		if not ch then return end
		for _,part in pairs(ch:GetDescendants()) do
			if part:IsA("BasePart") then part.CanCollide = false end
		end
	end)
	setStatus("Noclip ON")
end
local function stopNoclip()
	if noclipConn then noclipConn:Disconnect(); noclipConn = nil end
	local ch = plr.Character
	if ch then for _,part in pairs(ch:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = true end end end
	setStatus("Noclip OFF")
end
local function toggleNoclip() if noclipConn then stopNoclip() else startNoclip() end end

-- fly
local flyConn, flyBV, flyBG
local flyOn = false
local function startFly()
	if flyOn then return end
	local hrp = getHRP(plr)
	if not hrp then setStatus("No HRP") return end
	flyOn = true
	flyBV = Instance.new("BodyVelocity", hrp)
	flyBV.MaxForce = Vector3.new(1e5,1e5,1e5)
	flyBG = Instance.new("BodyGyro", hrp)
	flyBG.MaxTorque = Vector3.new(1e5,1e5,1e5)
	flyBG.CFrame = hrp.CFrame
	setStatus("Fly ON (WASD + Space/LeftCtrl)")
	local speed = 100
	flyConn = RunService.RenderStepped:Connect(function()
		if not flyOn or not hrp.Parent then if flyConn then flyConn:Disconnect(); flyConn=nil end return end
		local cam = Workspace.CurrentCamera
		local forward = cam.CFrame.LookVector
		local right = cam.CFrame.RightVector
		local v = Vector3.new()
		if UserInputService:IsKeyDown(Enum.KeyCode.W) then v = v + forward end
		if UserInputService:IsKeyDown(Enum.KeyCode.S) then v = v - forward end
		if UserInputService:IsKeyDown(Enum.KeyCode.D) then v = v + right end
		if UserInputService:IsKeyDown(Enum.KeyCode.A) then v = v - right end
		if UserInputService:IsKeyDown(Enum.KeyCode.Space) then v = v + Vector3.new(0,1,0) end
		if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then v = v - Vector3.new(0,1,0) end
		if v.Magnitude > 0 then flyBV.Velocity = v.Unit * speed; flyBG.CFrame = cam.CFrame else flyBV.Velocity = Vector3.new(0,0,0) end
	end)
end
local function stopFly()
	flyOn = false
	if flyConn then flyConn:Disconnect(); flyConn = nil end
	if flyBV then flyBV:Destroy(); flyBV = nil end
	if flyBG then flyBG:Destroy(); flyBG = nil end
	setStatus("Fly OFF")
end
local function toggleFly() if flyOn then stopFly() else startFly() end end

-- bring/tp/follow
local followConn, followTarget
local function bringPlayer(q)
	local t = findPlayer(q)
	if not t then setStatus("Player not found"); return end
	local hrp = getHRP(plr); local tr = getHRP(t)
	if not hrp or not tr then setStatus("Missing HRP") return end
	tr.CFrame = hrp.CFrame + Vector3.new(0,0,3)
	setStatus("Brought "..t.Name)
end
local function tpToPlayer(q)
	local t = findPlayer(q)
	if not t then setStatus("Player not found"); return end
	local hrp = getHRP(plr); local tr = getHRP(t)
	if not hrp or not tr then setStatus("Missing HRP") return end
	hrp.CFrame = tr.CFrame + Vector3.new(0,3,0)
	setStatus("Teleported to "..t.Name)
end
local function followPlayer(q)
	if followConn then followConn:Disconnect(); followConn = nil; followTarget = nil; setStatus("Stopped following"); return end
	local t = findPlayer(q)
	if not t then setStatus("Player not found"); return end
	followTarget = t
	local hrp = getHRP(plr)
	if not hrp then setStatus("No HRP") return end
	followConn = RunService.Heartbeat:Connect(function()
		local tr = getHRP(followTarget)
		local hr = getHRP(plr)
		if tr and hr then hr.CFrame = tr.CFrame * CFrame.new(0,0,3) end
	end)
	setStatus("Following "..t.Name)
end

-- SPECTATE / VIEW (inserted right after followPlayer)
local viewConn
local viewing
local function spectatePlayer(q)
	if viewing then
		if viewConn then viewConn:Disconnect() end
		viewConn = nil
		viewing = nil
		local hum = plr.Character and plr.Character:FindFirstChildWhichIsA("Humanoid")
		if hum and workspace.CurrentCamera then
			workspace.CurrentCamera.CameraSubject = hum
		end
		setStatus("Stopped spectating")
		return
	end

	local t = findPlayer(q)
	if not t then setStatus("Player not found"); return end
	if not t.Character then setStatus("Player has no character"); return end

	local h = t.Character:FindFirstChildWhichIsA("Humanoid")
	if not h then setStatus("No humanoid found for "..t.Name); return end

	if workspace.CurrentCamera then
		workspace.CurrentCamera.CameraSubject = h
	end
	viewing = t
	setStatus("Spectating "..t.Name)

	-- Disconnect if target's character is removed (simple non-persistent stop)
	viewConn = t.CharacterRemoving:Connect(function()
		if viewing == t then
			local hum = plr.Character and plr.Character:FindFirstChildWhichIsA("Humanoid")
			if hum and workspace.CurrentCamera then
				workspace.CurrentCamera.CameraSubject = hum
			end
			viewing = nil
			if viewConn then viewConn:Disconnect() end
			viewConn = nil
			setStatus("Target left or respawned; stopped spectating")
		end
	end)
end

-- click tp (teleport to where you click)
local clickTpConn
local function toggleClickTP()
	if clickTpConn then
		clickTpConn:Disconnect()
		clickTpConn = nil
		setStatus("Click TP OFF")
	else
		local mouse = plr:GetMouse()
		clickTpConn = mouse.Button1Down:Connect(function()
			local hrp = getHRP(plr)
			if hrp and mouse.Hit then
				-- teleport a bit above the clicked surface to avoid embedding
				hrp.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(0, 3, 0))
				setStatus("Teleported to click position")
			end
		end)
		setStatus("Click TP ON (click anywhere)")
	end
end

-- NPC spawn
local function spawnNPC(name)
	name = name or "NPC"
	local model = Instance.new("Model", Workspace)
	model.Name = name
	local hrp = Instance.new("Part", model)
	hrp.Name = "HumanoidRootPart"
	hrp.Size = Vector3.new(2,2,1)
	hrp.CFrame = (getHRP(plr) and getHRP(plr).CFrame * CFrame.new(0,0,-6)) or CFrame.new(0,5,0)
	hrp.Anchored = false
	local torso = Instance.new("Part", model)
	torso.Name = "Torso"
	torso.Size = Vector3.new(2,2,1)
	torso.CFrame = hrp.CFrame * CFrame.new(0,2,0)
	torso.Anchored = false
	local humanoid = Instance.new("Humanoid", model)
	model.PrimaryPart = hrp
	local weld = Instance.new("WeldConstraint", hrp)
	weld.Part0 = hrp
	weld.Part1 = torso
	setStatus("Spawned NPC: "..model.Name)
end

-- weather/sky/gravity/sound
local rainFolder
local function setWeather(kind)
	kind = (kind or ""):lower()
	if kind == "clear" then
		Lighting.FogStart = 0
		Lighting.FogEnd = 100000
		Lighting.FogColor = Color3.new(1,1,1)
		setStatus("Weather: clear")
	elseif kind == "fog" then
		Lighting.FogStart = 0
		Lighting.FogEnd = 200
		Lighting.FogColor = Color3.fromRGB(160,160,160)
		setStatus("Weather: fog")
	elseif kind == "rain" or kind == "storm" then
		Lighting.FogStart = 0
		Lighting.FogEnd = 120
		Lighting.FogColor = Color3.fromRGB(120,120,140)
		if rainFolder and rainFolder.Parent then rainFolder:Destroy() end
		rainFolder = Instance.new("Folder", Workspace)
		rainFolder.Name = ("Rain_"..plr.UserId.."_"..tostring(tick()))
		for i=1,90 do
			local p = Instance.new("Part")
			p.Size = Vector3.new(0.15,1,0.15)
			p.CanCollide = false
			p.Anchored = false
			local base = (getHRP(plr) and getHRP(plr).Position) or Vector3.new(0,10,0)
			p.Position = base + Vector3.new(math.random(-50,50), math.random(20,60), math.random(-50,50))
			p.Velocity = Vector3.new(0,-150,0)
			p.Color = Color3.fromRGB(140,140,180)
			p.Parent = rainFolder
			Debris:AddItem(p, 4)
		end
		setStatus("Weather: rain/storm (visual)")
	else
		setStatus("Weather: unknown. Use: clear | fog | rain | storm")
	end
end

local function setSky(assetId)
	if not assetId then setStatus("Usage: sky <assetid>") return end
	local sid = assetId:match("%d+")
	if not sid then setStatus("Invalid id") return end
	local sky = Instance.new("Sky")
	sky.SkyboxBk = "rbxassetid://"..sid
	sky.SkyboxDn = "rbxassetid://"..sid
	sky.SkyboxFt = "rbxassetid://"..sid
	sky.SkyboxLf = "rbxassetid://"..sid
	sky.SkyboxRt = "rbxassetid://"..sid
	sky.SkyboxUp = "rbxassetid://"..sid
	for _,v in pairs(Lighting:GetChildren()) do if v:IsA("Sky") then v:Destroy() end end
	sky.Parent = Lighting
	setStatus("Sky set to "..sid)
end

local function setGravity(val)
	local n = tonumber(val)
	if not n then setStatus("Usage: gravity <number>") return end
	Workspace.Gravity = n
	setStatus("Gravity set to "..n)
end

local function playSound(assetId, loop)
	local sid = assetId:match("%d+")
	if not sid then setStatus("Invalid id") return end
	local s = Instance.new("Sound")
	s.SoundId = "rbxassetid://"..sid
	s.Looped = (loop == "loop")
	s.Volume = 1
	local parent = (getHRP(plr) and getHRP(plr)) or Workspace
	s.Parent = parent
	s:Play()
	if not s.Looped then Debris:AddItem(s, 60) end
	setStatus("Playing sound "..sid)
end

-- Fun visuals: sparkles, shrink/grow, orbit, ghost, gun
local orbitConn
local orbitPart

local function addSparkles()
	local ch = plr.Character
	if not ch then setStatus("No char") return end
	for _,part in pairs(ch:GetChildren()) do
		if part:IsA("BasePart") then
			local s = Instance.new("Sparkles", part)
			s.SparkleColor = Color3.fromRGB(math.random(80,255), math.random(80,255), math.random(80,255))
			Debris:AddItem(s, 12)
			local f = Instance.new("Fire", part)
			f.Heat = 6
			f.Size = 6
			Debris:AddItem(f, 12)
			local sm = Instance.new("Smoke", part)
			sm.Color = Color3.fromRGB(200,200,200)
			sm.Size = 2
			Debris:AddItem(sm, 12)
		end
	end
	setStatus("Sparkles/fire/smoke added")
end

local function scaleCharacter(factor)
	local ch = plr.Character
	if not ch then setStatus("No char") return end
	for _,obj in pairs(ch:GetDescendants()) do
		if obj:IsA("BasePart") and obj.Name ~= "HumanoidRootPart" then
			obj.Size = obj.Size * factor
		end
	end
	setStatus((factor < 1 and "Shrunk") or "Grew")
end

local function startOrbit()
	if orbitConn then orbitConn:Disconnect(); orbitConn = nil end
	if orbitPart and orbitPart.Parent then orbitPart:Destroy() end
	local hrp = getHRP(plr)
	if not hrp then setStatus("No HRP") return end
	orbitPart = Instance.new("Part", Workspace)
	orbitPart.Shape = Enum.PartType.Ball
	orbitPart.Size = Vector3.new(1.5,1.5,1.5)
	orbitPart.Color = Color3.fromRGB(math.random(100,255), math.random(100,255), math.random(100,255))
	orbitPart.Anchored = true
	orbitPart.CanCollide = false
	local start = tick()
	orbitConn = RunService.RenderStepped:Connect(function()
		if not orbitPart or not orbitPart.Parent or not hrp then orbitConn:Disconnect() return end
		local t = tick() - start
		local cf = hrp.CFrame * CFrame.Angles(0,t*2,0) * CFrame.new(4,2,0)
		orbitPart.CFrame = cf
	end)
	setStatus("Orbiting orb spawned")
end

local function stopOrbit()
	if orbitConn then orbitConn:Disconnect(); orbitConn = nil end
	if orbitPart and orbitPart.Parent then orbitPart:Destroy(); orbitPart = nil end
	setStatus("Orbit stopped")
end

local function ghostMode()
	local ch = plr.Character
	if not ch then setStatus("No char") return end
	for _,d in pairs(ch:GetDescendants()) do
		if d:IsA("BasePart") then d.Transparency = 0.6 end
		if d:IsA("Decal") then d.Transparency = 0.6 end
	end
	local blur = Instance.new("BlurEffect", Lighting)
	blur.Size = 10
	Debris:AddItem(blur, 8)
	setStatus("Ghost mode visual")
end

local function attachFakeGun()
	local ch = plr.Character
	if not ch then setStatus("No char") return end
	-- clean existing fake gun
	for _,v in pairs(ch:GetChildren()) do
		if v:IsA("Model") and v.Name == "FakeGun" then v:Destroy() end
		if v:IsA("Tool") and v.Name == "FakeGun" then v:Destroy() end
	end
	local rArm = ch:FindFirstChild("Right Arm") or ch:FindFirstChild("RightHand") or ch:FindFirstChild("RightLowerArm")
	if not rArm then setStatus("No right arm") return end
	local gun = Instance.new("Model", ch)
	gun.Name = "FakeGun"
	local handle = Instance.new("Part", gun)
	handle.Name = "Handle"
	handle.Size = Vector3.new(1,2,0.6)
	handle.Color = Color3.fromRGB(60,60,60)
	handle.Material = Enum.Material.Metal
	handle.CanCollide = false
	handle.Anchored = false
	local barrel = Instance.new("Part", gun)
	barrel.Name = "Barrel"
	barrel.Size = Vector3.new(0.4,0.4,2)
	barrel.Color = Color3.fromRGB(40,40,40)
	barrel.Material = Enum.Material.Metal
	barrel.CanCollide = false
	local grip = Instance.new("Part", gun)
	grip.Name = "Grip"
	grip.Size = Vector3.new(0.5,1,0.5)
	grip.Color = Color3.fromRGB(45,45,45)
	grip.Material = Enum.Material.Metal
	grip.CanCollide = false
	local attachCF = rArm.CFrame * CFrame.new(0,-1,-1)
	handle.CFrame = attachCF
	barrel.CFrame = handle.CFrame * CFrame.new(0,0,-1.3)
	grip.CFrame = handle.CFrame * CFrame.new(0,-0.7,0)
	local w1 = Instance.new("WeldConstraint", handle)
	w1.Part0 = handle; w1.Part1 = rArm
	local w2 = Instance.new("WeldConstraint", barrel)
	w2.Part0 = barrel; w2.Part1 = handle
	local w3 = Instance.new("WeldConstraint", grip)
	w3.Part0 = grip; w3.Part1 = handle
	setStatus("Fake R6 gun attached (visual only)")
end

-- REPLACED giveFunnyTool: creates a functional client-side FunnyTool (tool name sanitized)
local function giveFunnyTool()
	-- create a template tool that will be placed in the player's Backpack
	if not plr then return end

	-- If a tool of the same name already exists in backpack, don't duplicate
	if backpack:FindFirstChild("FunnyTool") then
		setStatus("FunnyTool already in Backpack")
		return
	end

	-- Template tool
	local tool = Instance.new("Tool")
	tool.Name = "FunnyTool"
	tool.ToolTip = "Funny animation tool"
	tool.RequiresHandle = false

	-- We'll create a client-side handle when equipping (so no server Handle required)
	-- But to keep Roblox Tool happy we create a small invisible Handle part (not required, but safe)
	local handle = Instance.new("Part")
	handle.Name = "Handle"
	handle.Size = Vector3.new(0.2,0.2,0.2)
	handle.Transparency = 1
	handle.CanCollide = false
	handle.Parent = tool

	-- local state
	local isActive = false
	local track = nil
	local nameGui = nil

	-- helper to find humanoid and rig type
	local function getLocalHumanoid()
		if not plr.Character then return nil end
		return plr.Character:FindFirstChildWhichIsA("Humanoid")
	end
	local function isR15(character)
		local h = character and character:FindFirstChildWhichIsA("Humanoid")
		if not h then return false end
		return h.RigType == Enum.HumanoidRigType.R15
	end

	-- show a safe billboard name above player's head while equipped
	local function showToolName()
		if not plr.Character then return end
		local head = plr.Character:FindFirstChild("Head")
		if not head then return end

		if nameGui then nameGui:Destroy() end

		nameGui = Instance.new("BillboardGui")
		nameGui.Name = "FunnyToolBillboard"
		nameGui.Parent = head
		nameGui.Size = UDim2.new(4, 0, 1, 0)
		nameGui.StudsOffset = Vector3.new(0, 3, 0)
		nameGui.AlwaysOnTop = true

		local textLabel = Instance.new("TextLabel")
		textLabel.Parent = nameGui
		textLabel.Size = UDim2.new(1, 0, 1, 0)
		textLabel.BackgroundTransparency = 1
		textLabel.Text = "FunnyTool Active"
		textLabel.TextColor3 = Color3.new(1, 1, 1)
		textLabel.TextScaled = true
		textLabel.Font = Enum.Font.GothamBlack
	end

	local function hideToolName()
		if nameGui then
			nameGui:Destroy()
			nameGui = nil
		end
	end

	-- play short animation: uses different IDs depending on rig
	local function playAnimationOnce()
		if not isActive then return end
		local char = plr.Character
		if not char then return end
		local humanoid = getLocalHumanoid()
		if not humanoid then return end

		local rigR15 = isR15(char)
		local anim = Instance.new("Animation")
		-- Use the asset ids you provided earlier (kept as-is). These are client-played animations.
		anim.AnimationId = rigR15 and "rbxassetid://698251653" or "rbxassetid://72042024"

		-- ensure there's an Animator
		local animator = humanoid:FindFirstChildOfClass("Animator")
		if not animator then
			animator = Instance.new("Animator")
			animator.Parent = humanoid
		end

		-- load and play
		if track then
			track:Stop()
			track = nil
		end
		track = animator:LoadAnimation(anim)
		if track then
			track:Play()
			-- small adjustments to speed/position similar to original script
			track:AdjustSpeed(rigR15 and 0.7 or 0.65)
			track.TimePosition = 0.6
			-- short wait loop (client-side)
			spawn(function()
				while track and track.IsPlaying and track.TimePosition < (rigR15 and 0.65 or 0.7) do
					task.wait(0.1)
				end
				if track then
					track:Stop()
					track = nil
				end
			end)
		end
	end

	local function stopAll()
		isActive = false
		if track then
			track:Stop()
			track = nil
		end
		hideToolName()
	end

	-- tool events
	tool.Equipped:Connect(function()
		isActive = true
		showToolName()
	end)

	tool.Unequipped:Connect(function()
		stopAll()
	end)

	tool.Activated:Connect(function()
		if isActive then
			playAnimationOnce()
		end
	end)

	-- place tool in Backpack
	tool.Parent = backpack
	setStatus("FunnyTool added to Backpack")
end

local function clearVisuals()
	-- destroy orbit
	if orbitConn then orbitConn:Disconnect(); orbitConn = nil end
	if orbitPart and orbitPart.Parent then orbitPart:Destroy(); orbitPart = nil end
	-- remove fake guns & temporary effects
	local ch = plr.Character
	if ch then
		for _,v in pairs(ch:GetChildren()) do
			if v:IsA("Model") and v.Name == "FakeGun" then v:Destroy() end
			if v:IsA("Tool") and v.Name == "FakeGun" then v:Destroy() end
			for _,d in pairs(v:GetDescendants()) do
				if d:IsA("Sparkles") or d:IsA("Fire") or d:IsA("Smoke") then d:Destroy() end
			end
		end
	end
	-- remove rain folder if exists
	if rainFolder and rainFolder.Parent then rainFolder:Destroy(); rainFolder = nil end
	setStatus("Cleared visuals")
end

-- commands and descriptions to show in cmds UI
local commands = {
	{"hello","Greets you."},
	{"tp | spawn","Teleport to spawn."},
	{"tp <player>","Teleport to a player."},
	{"tpplayer <player>","Alias for tp <player>."},
	{"bring <player>","Bring a player to you (client-side)."},
	{"follow <player>","Follow a player (toggle)."},
	{"view <player>","Spectate a player's perspective (toggle)"},
	{"speed <num|reset>","Set WalkSpeed or reset to default."},
	{"jump <num|reset>","Set JumpPower or reset to default."},
	{"fly","Toggle flying (WASD + Space/LeftCtrl)."},
	{"noclip","Toggle noclip for your character."},
	{"heal | heal <player>","Heal yourself or another (client-side)."},
	{"give <toolname>","Give a simple tool to your Backpack."},
	{"part <name> <sx,sy,sz> <r,g,b>","Spawn a part in front of you."},
	{"color <r,g,b>","Set your character color."},
	{"time <hour>","Set local Lighting.ClockTime."},
	{"kill","Kill yourself (set health to 0)."},
	{"invis","Toggle invisibility (local)."},
	{"freeze / unfreeze","Anchor/unanchor your HumanoidRootPart."},
	{"say <message>","Post a system chat message locally."},
	{"npc <name>","Spawn a simple NPC model."},
	{"weather <clear|fog|rain|storm>","Client-side weather visuals."},
	{"sky <assetid>","Set Lighting Skybox to asset id."},
	{"gravity <number>","Set workspace gravity (client-side)."},
	{"sound <assetid> [loop]","Play a sound locally."},
	{"play <assetid> [loop]","Alias for sound."},
	{"sparkles","Add sparkles/fire/smoke to your character."},
	{"shrink","Visually shrink your character."},
	{"grow","Visually grow your character."},
	{"orbit","Spawn a colored orb that orbits you (toggle)."},
	{"ghost","Fade your character and add blur effect."},
	{"sword","its a fucking sword, what else do you need to know."},
	{"cleareffects","Clear visual effects (orbit, rain, temp effects)."},
	{"jerk","Gives tool that strokes your 1 inch dingaling (animation tool)."},
	{"cmds","Open the commands list (this window)."},
	{"clicktp","Toggle click-to-teleport (click anywhere to TP)."},
	{"help","Print commands list to Output."}
}

-- cmds GUI: scrollable list rows with Copy + Run
local cmdsGui
local function makeCmdsGui()
	if cmdsGui and cmdsGui.Parent then return cmdsGui end
	cmdsGui = Instance.new("ScreenGui", pg)
	cmdsGui.Name = "CmdsGui"
	local frm = Instance.new("Frame", cmdsGui)
	frm.Size = UDim2.new(0,520,0,420)
	frm.Position = UDim2.new(0.5,-260,0.12,0)
	frm.BackgroundColor3 = Color3.fromRGB(18,18,18)
	frm.BorderSizePixel = 0
	local frmCorner = Instance.new("UICorner", frm)
	frmCorner.CornerRadius = UDim.new(0,8)

	local title = Instance.new("TextLabel", frm)
	title.Size = UDim2.new(1,0,0,36)
	title.Position = UDim2.new(0,0,0,0)
	title.Text = "bfgs weird ass admin panel"
	title.BackgroundTransparency = 1
	title.TextColor3 = Color3.new(1,1,1)
	title.TextXAlignment = Enum.TextXAlignment.Center
	title.Font = Enum.Font.SourceSansBold
	title.TextSize = 18

	local close = Instance.new("TextButton", frm)
	close.Size = UDim2.new(0,68,0,26)
	close.Position = UDim2.new(1,-78,0,6)
	close.Text = "Close"
	close.BackgroundColor3 = Color3.fromRGB(80,80,80)
	close.TextColor3 = Color3.new(1,1,1)
	local closeCorner = Instance.new("UICorner", close)
	closeCorner.CornerRadius = UDim.new(0,6)
	close.MouseButton1Click:Connect(function() cmdsGui:Destroy(); cmdsGui = nil end)

	-- ScrollingFrame
	local scroll = Instance.new("ScrollingFrame", frm)
	scroll.Size = UDim2.new(1,-16,1,-56)
	scroll.Position = UDim2.new(0,8,0,44)
	scroll.CanvasSize = UDim2.new(0,0,0,0)
	scroll.ScrollBarThickness = 8
	scroll.BackgroundTransparency = 0.12
	scroll.BorderSizePixel = 0
	scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y

	local layout = Instance.new("UIListLayout", scroll)
	layout.SortOrder = Enum.SortOrder.LayoutOrder
	layout.Padding = UDim.new(0,8)

	-- helper: add command row
	local function addCommandRow(name, desc)
		local row = Instance.new("Frame", scroll)
		row.Size = UDim2.new(1, -12, 0, 44)
		row.BackgroundTransparency = 1

		local left = Instance.new("Frame", row)
		left.Size = UDim2.new(1, -140, 1, 0)
		left.Position = UDim2.new(0,6,0,0)
		left.BackgroundTransparency = 1

		local cmdLabel = Instance.new("TextLabel", left)
		cmdLabel.Size = UDim2.new(1,0,0,20)
		cmdLabel.Position = UDim2.new(0,0,0,0)
		cmdLabel.BackgroundTransparency = 1
		cmdLabel.Text = name
		cmdLabel.TextColor3 = Color3.fromRGB(230,230,230)
		cmdLabel.TextXAlignment = Enum.TextXAlignment.Left
		cmdLabel.Font = Enum.Font.SourceSansBold
		cmdLabel.TextSize = 16

		local descLabel = Instance.new("TextLabel", left)
		descLabel.Size = UDim2.new(1,0,0,20)
		descLabel.Position = UDim2.new(0,0,0,20)
		descLabel.BackgroundTransparency = 1
		descLabel.Text = desc
		descLabel.TextColor3 = Color3.fromRGB(190,190,190)
		descLabel.TextXAlignment = Enum.TextXAlignment.Left
		descLabel.Font = Enum.Font.SourceSans
		descLabel.TextSize = 14

		local btnCopy = Instance.new("TextButton", row)
		btnCopy.Size = UDim2.new(0,56,0,28)
		btnCopy.Position = UDim2.new(1,-136,0,8)
		btnCopy.Text = "Copy"
		btnCopy.BackgroundColor3 = Color3.fromRGB(75,75,75)
		btnCopy.TextColor3 = Color3.new(1,1,1)
		local bc = Instance.new("UICorner", btnCopy); bc.CornerRadius = UDim.new(0,6)
		btnCopy.MouseButton1Click:Connect(function()
			input.Text = name
			setStatus("Copied: "..name, 2)
		end)

		local btnRun = Instance.new("TextButton", row)
		btnRun.Size = UDim2.new(0,56,0,28)
		btnRun.Position = UDim2.new(1,-72,0,8)
		btnRun.Text = "Run"
		btnRun.BackgroundColor3 = Color3.fromRGB(70,120,170)
		btnRun.TextColor3 = Color3.new(1,1,1)
		local br = Instance.new("UICorner", btnRun); br.CornerRadius = UDim.new(0,6)
		btnRun.MouseButton1Click:Connect(function()
			input.Text = name
			setStatus("Running: "..name)
			runCommand(name)
		end)
	end

	-- populate rows from commands table
	for _,row in ipairs(commands) do
		addCommandRow(row[1], row[2])
	end

	-- update canvas when layout changes
	layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
		local s = layout.AbsoluteContentSize
		scroll.CanvasSize = UDim2.new(0, s.X, 0, s.Y + 12)
	end)

	-- initial sizing
	local szz = layout.AbsoluteContentSize
	scroll.CanvasSize = UDim2.new(0, szz.X, 0, szz.Y + 12)

	-- draggable
	local dragging, dragStart, startPos = false, Vector2.new(), Vector2.new()
	title.InputBegan:Connect(function(inp)
		if inp.UserInputType == Enum.UserInputType.MouseButton1 then
			dragging = true
			dragStart = inp.Position
			startPos = frm.AbsolutePosition
			inp.Changed:Connect(function() if inp.UserInputState == Enum.UserInputState.End then dragging = false end end)
		end
	end)
	UserInputService.InputChanged:Connect(function(inp)
		if dragging and inp.UserInputType == Enum.UserInputType.MouseMovement then
			local delta = inp.Position - dragStart
			frm.Position = UDim2.new(0, startPos.X + delta.X, 0, startPos.Y + delta.Y)
		end
	end)

	return cmdsGui
end

-- main runner (pcall-protected)
function runCommand(raw)
	if not raw then return end
	local ok,err = pcall(function()
		local s = raw:match("^%s*(.-)%s*$")
		if s == "" then setStatus("Empty"); return end
		local parts = {}
		for w in s:gmatch("%S+") do table.insert(parts, w) end
		local cmd = parts[1]:lower()

		if cmd == "hello" then setStatus("Hello "..plr.Name)
		elseif cmd == "tp" or cmd == "spawn" then
			if parts[2] then tpToPlayer(parts[2]) else
				local spawn = Workspace:FindFirstChildWhichIsA("SpawnLocation") or Workspace:FindFirstChildWhichIsA("BasePart")
				local ch = plr.Character
				if ch and ch:FindFirstChild("HumanoidRootPart") and spawn then
					ch.HumanoidRootPart.CFrame = spawn.CFrame + Vector3.new(0,3,0)
					setStatus("Teleported to spawn")
				else setStatus("No spawn/char") end
			end
		elseif cmd == "tpplayer" and parts[2] then tpToPlayer(parts[2])
		elseif cmd == "bring" and parts[2] then bringPlayer(parts[2])
		elseif cmd == "follow" and parts[2] then followPlayer(parts[2])
		elseif cmd == "view" and parts[2] then spectatePlayer(parts[2])
		elseif cmd == "speed" then
			if parts[2] == "reset" then setWalk(defaultWalk); setStatus("Speed reset")
			else local n = tonumber(parts[2]); if n and n>0 then setWalk(n); setStatus("Speed set to "..n) else setStatus("Usage: speed <num|reset>") end end
		elseif cmd == "jump" then
			if parts[2] == "reset" then setJump(defaultJump); setStatus("Jump reset")
			else local n = tonumber(parts[2]); if n and n>0 then setJump(n); setStatus("Jump set to "..n) else setStatus("Usage: jump <num|reset>") end end
		elseif cmd == "fly" then toggleFly()
		elseif cmd == "noclip" then toggleNoclip()
		elseif cmd == "heal" then
			if parts[2] then local t = findPlayer(parts[2]); if t then healOne(t); setStatus("Healed "..t.Name) else setStatus("Player not found") end
			else healOne(plr); setStatus("Healed you") end
		elseif cmd == "give" and parts[2] then giveTool(parts[2])
		elseif cmd == "part" then
			if parts[2] then spawnPart(parts[2], parts[3], parts[4]) else setStatus("Usage: part <name> <sx,sy,sz> <r,g,b>") end
		elseif cmd == "color" and parts[2] then
			local r,g,b = parts[2]:match("^(%d+),(%d+),(%d+)")
			if r then
				local col = Color3.fromRGB(tonumber(r),tonumber(g),tonumber(b))
				local ch = plr.Character
				if ch then
					for _,p in pairs(ch:GetDescendants()) do
						if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then p.Color = col end
					end
					setStatus("Color set")
				else setStatus("No character")
				end
			else setStatus("Color format r,g,b") end
		elseif cmd == "time" and parts[2] then
			local hr = tonumber(parts[2])
			if hr then Lighting.ClockTime = hr; setStatus("Time set to "..hr) else setStatus("Usage: time <hour>") end
		elseif cmd == "kill" then local h = getHum(plr); if h then h.Health = 0 end
		elseif cmd == "invis" then toggleInvis()
		elseif cmd == "freeze" then toggleFreeze()
		elseif cmd == "unfreeze" then toggleFreeze()
		elseif cmd == "say" then
			if #parts >= 2 then local msg = table.concat(parts," ",2); game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text=plr.Name.." says: "..msg, Color=Color3.fromRGB(200,200,100)}); setStatus("Said: "..msg) else setStatus("Usage: say <message>") end
		elseif cmd == "help" then
			setStatus("Help printed to output"); warn("Commands:\n" .. table.concat((function()
				local t = {}
				for _,c in ipairs(commands) do table.insert(t, c[1].." - "..c[2]) end
				return t
			end)(), "\n"))
		elseif cmd == "npc" and parts[2] then spawnNPC(parts[2])
		elseif cmd == "weather" and parts[2] then setWeather(parts[2])
		elseif cmd == "sky" and parts[2] then setSky(parts[2])
		elseif cmd == "gravity" and parts[2] then setGravity(parts[2])
		elseif (cmd == "sound" or cmd == "play") and parts[2] then playSound(parts[2], parts[3])
		-- fun visual commands
		elseif cmd == "sparkles" then addSparkles()
		elseif cmd == "shrink" then scaleCharacter(0.6)
		elseif cmd == "grow" then scaleCharacter(1.4)
		elseif cmd == "orbit" then
			if orbitConn then stopOrbit() else startOrbit() end
		elseif cmd == "ghost" then ghostMode()
		elseif cmd == "sword" then attachFakeGun()
		elseif cmd == "cleareffects" then clearVisuals()
		elseif cmd == "jerk" then giveFunnyTool()
		elseif cmd == "cmds" then makeCmdsGui()
		elseif cmd == "clicktp" then toggleClickTP()
		else setStatus("Unknown: "..tostring(cmd))
		end
	end)
	if not ok then setStatus("Error: "..tostring(err), 6) end
end

-- UI connections
runBtn.Activated:Connect(function() runCommand(input.Text) end)
removeBtn.Activated:Connect(function() input.Text = "" end) -- clears only the textbox
input.FocusLost:Connect(function(enter) if enter then runCommand(input.Text) end end)

UserInputService.InputBegan:Connect(function(inputObj, processed)
	if processed then return end
	if inputObj.KeyCode == Enum.KeyCode.RightShift then sg.Enabled = not sg.Enabled end
	if inputObj.KeyCode == Enum.KeyCode.Backspace then input.Text = "" end
end)

-- reset defaults on spawn
plr.CharacterAdded:Connect(function(char)
	delay(0.2, function()
		local hum = char:FindFirstChildWhichIsA("Humanoid")
		if hum then
			hum.WalkSpeed = defaultWalk
			hum.JumpPower = defaultJump
		end
	end)
end)

setStatus("Ready — type 'help' or 'cmds' for list")

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...