using UnityEngine; [AddComponentMenu("Gameplay/NoclipController")] public class NoclipController : MonoBehaviour { public float moveSpeed = 10f; public float boostMultiplier = 3f; public float mouseSensitivity = 2f; public bool lockCursor = true; float yaw = 0f; float pitch = 0f; void Start() { Vector3 angles = transform.eulerAngles; yaw = angles.y; pitch = angles.x; if (lockCursor) Cursor.lockState = CursorLockMode.Locked; } void Update() { // Rotação com mouse float mx = Input.GetAxis("Mouse X") * mouseSensitivity; float my = -Input.GetAxis("Mouse Y") * mouseSensitivity; yaw += mx; pitch += my; pitch = Mathf.Clamp(pitch, -89f, 89f); transform.rotation = Quaternion.Euler(pitch, yaw, 0f); // Movimento local Vector3 input = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); // vertical (subir/descer) if (Input.GetKey(KeyCode.E)) input.y += 1f; if (Input.GetKey(KeyCode.Q)) input.y -= 1f; float speed = moveSpeed; if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) speed *= boostMultiplier; Vector3 movement = transform.TransformDirection(input) * speed * Time.deltaTime; transform.position += movement; } }extends Spatial export var speed := 10.0 export var boost := 3.0 export var sensitivity := 0.3 var yaw := 0.0 var pitch := 0.0 func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _unhandled_input(event): if event is InputEventMouseMotion: yaw -= event.relative.x * sensitivity * 0.01 pitch -= event.relative.y * sensitivity * 0.01 pitch = clamp(pitch, -1.5, 1.5) rotation = Vector3(pitch, yaw, 0) func _process(delta): var dir = Vector3.ZERO if Input.is_action_pressed("ui_up"): dir -= transform.basis.z if Input.is_action_pressed("ui_down"): dir += transform.basis.z if Input.is_action_pressed("ui_left"): dir -= transform.basis.x if Input.is_action_pressed("ui_right"): dir += transform.basis.x if Input.is_action_pressed("move_up"): dir += transform.basis.y if Input.is_action_pressed("move_down"): dir -= transform.basis.y var s = speed if Input.is_action_pressed("ui_shift"): s *= boost if dir != Vector3.ZERO: translation += dir.normalized() * s * deltaimport pygame, sys pygame.init() w,h = 800,600 screen = pygame.display.set_mode((w,h)) clock = pygame.time.Clock() x,y = w//2, h//2 speed = 300 while True: dt = clock.tick(60)/1000.0 for e in pygame.event.get(): if e.type == pygame.QUIT: pygame.quit(); sys.exit() keys = pygame.key.get_pressed() dx = (keys[pygame.K_d] - keys[pygame.K_a]) * speed * dt dy = (keys[pygame.K_s] - keys[pygame.K_w]) * speed * dt if keys[pygame.K_LSHIFT]: dx *= 2; dy *= 2 x += dx y += dy screen.fill((30,30,30)) # desenha "paredes" só como referência — não há colisão pygame.draw.rect(screen, (200,50,50), (100,100,600,50)) pygame.draw.rect(screen, (200,50,50), (100,450,600,50)) pygame.draw.circle(screen, (50,200,50), (int(x),int(y)), 10) pygame.display.flip()-- Server: Admin validation + RemoteEvent handler local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") -- Crie um RemoteEvent em ReplicatedStorage chamado "AdminAction" local adminEvent = ReplicatedStorage:FindFirstChild("AdminAction") if not adminEvent then adminEvent = Instance.new("RemoteEvent") adminEvent.Name = "AdminAction" adminEvent.Parent = ReplicatedStorage end -- Lista de admins (coloque aqui os UserIds dos seus administradores) local ADMINS = { [12345678] = true, -- substitua por IDs reais [87654321] = true, } local function isAdmin(player) if not player then return false end return ADMINS[player.UserId] == true end -- Ações permitidas pelo admin (servidor valida) adminEvent.OnServerEvent:Connect(function(player, action, params) if not isAdmin(player) then warn(player.Name .. " tentou executar ação admin sem permissão: " .. tostring(action)) return end if action == "RequestAdmin" then -- confirma que esse jogador é admin (retorno via RemoteEvent se quiser) adminEvent:FireClient(player, "AdminGranted", {}) elseif action == "RespawnPlayer" then local target = params and params.targetPlayer if typeof(target) == "Instance" and target:IsA("Player") and target.Character then -- Respawn para testes (não é um ataque) target:LoadCharacter() end elseif action == "TeleportTo" then local target = params and params.targetPlayer local pos = params and params.position if typeof(target) == "Instance" and target:IsA("Player") and target.Character and typeof(pos) == "Vector3" then local hrp = target.Character:FindFirstChild("HumanoidRootPart") if hrp then hrp.CFrame = CFrame.new(pos) end end else warn("Ação admin desconhecida: " .. tostring(action)) end end)-- Local: Fly + Noclip para admins (ativa somente após confirmação do servidor) local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local adminEvent = ReplicatedStorage:WaitForChild("AdminAction") local isAdmin = false -- pede confirmação ao servidor adminEvent:FireServer("RequestAdmin") adminEvent.OnClientEvent:Connect(function(action, data) if action == "AdminGranted" then isAdmin = true print("Permissões de admin confirmadas.") end end) -- --- Fly vars local flying = false local flySpeed = 100 local bodyVelocity = nil local bodyGyro = nil -- --- Noclip vars local noclip = false local connections = {} local function enableNoclip() if not player.Character then return end noclip = true for _, part in pairs(player.Character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end local-- Local: Fly + Noclip para admins (ativa somente após confirmação do servidor) local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local adminEvent = ReplicatedStorage:WaitForChild("AdminAction") local isAdmin = false -- pede confirmação ao servidor adminEvent:FireServer("RequestAdmin") adminEvent.OnClientEvent:Connect(function(action, data) if action == "AdminGranted" then isAdmin = true print("Permissões de admin confirmadas.") end end) -- --- Fly vars local flying = false local flySpeed = 100 local bodyVelocity = nil local bodyGyro = nil -- --- Noclip vars local noclip = false local connections = {} local function enableNoclip() if not player.Character then return end noclip = true for _, part in pairs(player.Character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end