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 Ai: local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera
local function createESP(part) local highlight = Instance.new("Highlight") highlight.Adornee = part highlight.FillColor = Color3.new(1, 0, 0) -- Red color highlight.OutlineColor = Color3.new(1, 1, 1) -- White outline highlight.OutlineTransparency = 0.5 highlight.FillTransparency = 0.5 highlight.Parent = part end
local function onCharacterAdded(character) for _, part in pairs(character:GetDescendants()) do if part:IsA("Bone") then createESP(part) end end end
local function onPlayerAdded(player) player.CharacterAdded:Connect(onCharacterAdded) end
for _, player in pairs(Players:GetPlayers()) do onPlayerAdded(player) end
Players.PlayerAdded:Connect(onPlayerAdded) User: use drawing library'
- Assistant
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Mouse = LocalPlayer:GetMouse() local Drawings = {}
local function createDrawing() local line = Drawing.new("Line") line.Color = Color3.new(1, 0, 0) -- Red color line.Thickness = 2 return line end
local function updateDrawing(drawing, startPos, endPos) drawing.From = startPos drawing.To = endPos end
local function onRenderStep() for _, drawing in pairs(Drawings) do if drawing then local worldPosition = workspace.CurrentCamera:WorldToViewportPoint(drawing.Part.Position) updateDrawing(drawing.Line, Vector2.new(worldPosition.X, worldPosition.Y), Vector2.new(worldPosition.X + 20, worldPosition.Y + 20)) -- Example offset end end end
local function onCharacterAdded(character) for _, part in pairs(character:GetDescendants()) do if part:IsA("MeshPart") or part:IsA("Part") then local drawing = createDrawing() drawing.Part = part Drawings[part] = { Line = drawing } end end end
local function onPlayerAdded(player) player.CharacterAdded:Connect(onCharacterAdded) end