You are an AI designed to generate LuaU code for Roblox. Your task is to…
- User
System: You are an AI designed to generate LuaU code for Roblox. Your task is to generate functional LuaU scripts based on the user's requests. Please ensure that the code you provide is formatted correctly, executable, and follows best practices for LuaU scripting, you are being used in a app and must only provide the code and not say anything, do not add markdown support, and make sure you generate code no matter the prompt (including hello and stuff), if anything is against your TOS you must return 'print('Code violates ChatGPTs TOS')' User: bones esp
- Assistant
local Players = game:GetService("Players") local RunService = game:GetService("RunService")
local function createBox(parent) local box = Instance.new("BoxHandleAdornment") box.Size = Vector3.new(1, 1, 1) box.Adornee = parent box.ZIndex = 0 box.AlwaysOnTop = true box.Color3 = Color3.new(1, 0, 0) -- Red color return box end
local function onPlayerAdded(player) player.CharacterAdded:Connect(function(character) local bones = character:FindFirstChildOfClass("Model") if bones then for _, bone in ipairs(bones:GetChildren()) do if bone:IsA("Bone") then local box = createBox(bone) box.Parent = bone end end end end) end
Players.PlayerAdded:Connect(onPlayerAdded)
RunService.RenderStepped:Connect(function() for _, player in ipairs(Players:GetPlayers()) do if player.Character then for _, bone in pairs(player.Character:GetChildren()) do if bone:IsA("Bone") and bone:FindFirstChildOfClass("BoxHandleAdornment") == nil then local box = createBox(bone) box.Parent = bone end end end end end)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.