-- DevToolsServer.lua -- Place in: ServerScriptService -- Handles requests from the client dev menu. Server-authoritative for -- anything that affects gameplay state (skins, speed) so it stays in sync. local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") -- // Config ------------------------------------------------------------- local NORMAL_WALKSPEED = 16 local FAST_WALKSPEED = 50 -- "speedhack" value when enabled -- List every skin id / name you have set up in your game here. -- This is just an example list -- replace with your actual skin names. local ALL_SKINS = { "DefaultSkin", "RedCamo", "BlueCamo", "GoldSkin", "DragonSkin", "NeonSkin", } -- // Remote setup -------------------------------------------------------- local remotesFolder = ReplicatedStorage:FindFirstChild("DevToolsRemotes") if not remotesFolder then remotesFolder = Instance.new("Folder") remotesFolder.Name = "DevToolsRemotes" remotesFolder.Parent = ReplicatedStorage end local function getOrCreateRemote(name) local r = remotesFolder:FindFirstChild(name) if not r then r = Instance.new("RemoteEvent") r.Name = name r.Parent = remotesFolder end return r end local UnlockSkinsRemote = getOrCreateRemote("UnlockAllSkins") local SetSpeedRemote = getOrCreateRemote("SetSpeedHack") -- // Per-player unlocked skins (swap this for DataStore if you want it to persist) -- local unlockedSkins = {} -- // Unlock all skins ---------------------------------------------------- UnlockSkinsRemote.OnServerEvent:Connect(function(player) unlockedSkins[player.UserId] = {} for _, skinName in ipairs(ALL_SKINS) do unlockedSkins[player.UserId][skinName] = true end -- Fire back so the client UI can refresh / show confirmation UnlockSkinsRemote:FireClient(player, true, unlockedSkins[player.UserId]) print(("[DevTools] %s unlocked all skins."):format(player.Name)) end) -- // Speedhack toggle (server-side WalkSpeed change, so it's real for everyone) -- SetSpeedRemote.OnServerEvent:Connect(function(player, enabled) local character = player.Character if not character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end humanoid.WalkSpeed = enabled and FAST_WALKSPEED or NORMAL_WALKSPEED end) -- Reset WalkSpeed to normal whenever a player's character spawns, -- so the speed boost doesn't accidentally persist across deaths/respawns. Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.WalkSpeed = NORMAL_WALKSPEED end) end) -- Expose a function other server scripts (e.g. your WeaponScript) can call -- to check if a player has a given skin unlocked. local DevTools = {} function DevTools.HasSkin(player, skinName) local table_ = unlockedSkins[player.UserId] return table_ ~= nil and table_[skinName] == true end return DevTools