text
stringlengths
54
19.6k
input_text: Create an anchored cyan Wood Block part sized 12x1x2 at position 9,91,11 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(12,1,2) part.Position = Vector3.new(9,91,11) ...
task: Create a orange plastic block at (5,50,0) size (6,4,4) in Roblox. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,128,0) part.Size = Vector3.new(6,4,4) part.Position = Vector3.new(5,50,0) part.Anchored = false part...
query: Tween Position with Linear Out easing, 2s duration, infinite repeats, reversing in Roblox. response: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, true, 0) local goal = {Position = Vector3.n...
task: Apply a BodyVelocity of (-14, 58, 9) to a part. solution: local part = workspace:WaitForChild("PhysicsPart") local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.Velocity = Vector3.new(-14, 58, 9) bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.P = 1250 bodyVelocity.P...
instruction: Tween a part's Reflectance with Cubic In easing over 3s in Roblox answer: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.In) local goal = {Reflectance = 0.9} local tween = TweenService:Create(par...
instruction: Tween Reflectance with Back In easing, 5s duration, 1 repeats, non-reversing in Roblox. response: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(5, Enum.EasingStyle.Back, Enum.EasingDirection.In, 1, false, 0) local goal = {Reflectance = 0.9} l...
user: Create a cyan ice cylinder at (20,50,20) size (1,2,6) in Roblox. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Cylinder part.Material = Enum.Material.Ice part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(1,2,6) part.Position = Vector3.new(20,50,20) part.Anchored = true part.Par...
user: Create an unanchored cyan Wood Block part sized 6x6x8 at position -16,65,-23 in Roblox Luau. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(6,6,8) part.Position = Vector3.new(-16,65,-23...
query: Tween Size with Bounce In easing, 2s duration, infinite repeats, reversing in Roblox. end: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2, Enum.EasingStyle.Bounce, Enum.EasingDirection.In, -1, true, 0) local goal = {Size = Vector3.new(8,8,8)} loca...
begin: Create a TextButton saying "Undo" with Nunito font with background Color3.fromRGB(50,200,50) in Roblox GUI. solution: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0.3,0,0,60) elem.P...
task: Create a Frame with a UIListLayout (padding 2) containing 5 buttons. completion: local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local screenGui = Instance.new("ScreenGui") screenGui.Parent = playerGui local frame = Instance.new("...
user: Script a ball with foil material colored lime at (5,1,0) size (4,1,4) in Roblox. output: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.Foil part.Color = Color3.fromRGB(0,255,128) part.Size = Vector3.new(4,1,4) part.Position = Vector3.new(5,1,0) part.Anchored = fa...
input: Create a ScreenGui with a TextLabel that says "You Win!" using font SciFi at size 24. finish: local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local screenGui = Instance.new("ScreenGui") screenGui.Name = "CustomGui" screenGui.Paren...
task: Create a gold sand block at (20,25,0) size (1,4,2) in Roblox. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Sand part.Color = Color3.fromRGB(255,215,0) part.Size = Vector3.new(1,4,2) part.Position = Vector3.new(20,25,0) part.Anchored = true part.Parent =...
input_text: Create an anchored blue Wood Block part sized 2x4x2 at position -43,31,14 in Roblox Luau. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(0,0,255) part.Size = Vector3.new(2,4,2) part.Position = Vector3.new(-43,31,14...
question: Spawn a brown ice block part at (-5,20,0) size (8,6,8) in Roblox. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Ice part.Color = Color3.fromRGB(139,69,19) part.Size = Vector3.new(8,6,8) part.Position = Vector3.new(-5,20,0) part.Anchored = false par...
input: Create an unanchored white Wood Block part sized 6x2x10 at position -18,93,-3 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.new(1,1,1) part.Size = Vector3.new(6,2,10) part.Position = Vector3.new(-18,93,-3) part.A...
task: Tween CFrame with Linear In easing, 4s duration, infinite repeats, non-reversing in Roblox. model: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1, false, 0) local goal = {CFrame = part.CFrame*CF...
prompt: Tween Position with Quad InOut easing, 0.25s duration, 0 repeats, reversing in Roblox. result: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, true, 0) local goal = {Position = Vector3.new(...
question: Create an unanchored gray Wood Block part sized 6x6x8 at position 48,27,42 in Roblox Luau. completion: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(6,6,8) part.Position = Vector3.new(48,2...
begin: Detect when a player jumps in Roblox finish: local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.StateChanged:Connect(function(old, new) if new == Enum.Human...
user: Make a script that Cast a ray from the player's camera in the look direction for 500 studs. response: local Players = game:GetService("Players") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local mouse = player:GetMouse() local function castRay() local origin = camera.CFrame.Pos...
instruction: Detect N key press to print a message in Roblox end: local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.N then print("N pressed - print a message!") -- Add ...
input: Create an unanchored green Plastic Block part sized 2x6x8 at position -37,45,21 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,255,0) part.Size = Vector3.new(2,6,8) part.Position = Vector3.new(-37,45,2...
question: What's the code to a projectile weapon that fires a ball at speed 150 dealing 30 damage on hit. output_text: local tool = script.Parent local damage = 30 local speed = 150 local debounce = false tool.Activated:Connect(function() if debounce then return end debounce = true local character = ...
input: Create a TextButton saying "Resume" with Nunito font with background Color3.fromRGB(50,200,50) in Roblox GUI. output: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0.3,0,0,50) elem.P...
begin: Create an anchored black Wood Block part sized 12x1x4 at position -27,42,9 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.new(0,0,0) part.Size = Vector3.new(12,1,4) part.Position = Vector3.new(-27,42,9) part.Ancho...
question: Create an anchored gray Plastic Block part sized 10x4x6 at position -20,11,21 in Roblox Luau. output: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(10,4,6) part.Position = Vector3.new(-...
instruction: Make a ball that is gray and diamondplate at (-5,25,20) size (6,6,4) in Roblox. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.DiamondPlate part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(6,6,4) part.Position = Vector3.new(-5,25,20)...
start: Create an unanchored white Plastic Block part sized 6x1x6 at position 18,74,-18 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.new(1,1,1) part.Size = Vector3.new(6,1,6) part.Position = Vector3.new(18,74,-18) par...
question: Create an unanchored cyan Plastic Block part sized 10x1x10 at position 45,51,19 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(10,1,10) part.Position = Vector3.new(4...
start: Create an unanchored white Plastic Block part sized 10x4x8 at position -34,94,-20 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.new(1,1,1) part.Size = Vector3.new(10,4,8) part.Position = Vector3.new(-34,94,-20)...
task: Make a purple Wood part with a Sparkles effect attached in Roblox Luau. completion: local part = Instance.new("Part") part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,0,255) part.Size = Vector3.new(4,4,4) part.Position = Vector3.new(0,5,0) part.Anchored = true part.Parent = workspace local fx =...
user: Create an anchored yellow Wood Block part sized 6x1x10 at position 1,46,-49 in Roblox Luau. output_text: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(255,255,0) part.Size = Vector3.new(6,1,10) part.Position = Vector3.new(1,46,-4...
begin: Tween Reflectance with Linear In easing, 0.5s duration, 1 repeats, non-reversing in Roblox. output: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 1, false, 0) local goal = {Reflectance = 0.9} l...
user: Make a block that is yellow and cobblestone at (5,10,10) size (4,4,1) in Roblox. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Cobblestone part.Color = Color3.fromRGB(255,255,0) part.Size = Vector3.new(4,4,1) part.Position = Vector3.new(5,10,10) part.Anc...
input_text: Create a TextLabel saying "No" with Bangers font with background Color3.fromRGB(0,0,0) in Roblox GUI. result: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(1,0,0,40) elem.Positio...
start: Create a TextButton saying "Next" with Nunito font with background Color3.fromRGB(0,120,255) in Roblox GUI. result: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(1,0,0.1,0) elem.Posi...
instruction: Tween Reflectance with Sine Out easing, 3s duration, 0 repeats, non-reversing in Roblox. answer: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0) local goal = {Reflectance = 0.9} l...
prompt: Tween CFrame with Circular In easing, 2.5s duration, infinite repeats, non-reversing in Roblox. solution: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2.5, Enum.EasingStyle.Circular, Enum.EasingDirection.In, -1, false, 0) local goal = {CFrame = p...
prompt: Make a script that Show common Luau string operations and manipulation. output_text: -- String concatenation local first = "Hello" local second = "World" local combined = first .. " " .. second -- String interpolation (Luau feature) local name = "Player" local level = 5 local message = `{name} is level {level...
question: Spawn a pink cobblestone ball part at (-5,15,0) size (8,1,4) in Roblox. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.Cobblestone part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(8,1,4) part.Position = Vector3.new(-5,15,0) part.Ancho...
start: I need to Use Instance Attributes to store custom data on parts. response: -- Setting attributes local part = workspace:WaitForChild("MyPart") part:SetAttribute("Health", 100) part:SetAttribute("Team", "Red") part:SetAttribute("IsActive", true) part:SetAttribute("Damage", 25.5) -- Getting attributes local hea...
input_text: Create an unanchored pink Wood Block part sized 4x4x1 at position 0,9,32 in Roblox Luau. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(4,4,1) part.Position = Vector3.new(0,9,32) ...
start: Create an unanchored purple Wood Block part sized 1x4x10 at position -45,14,19 in Roblox Luau. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,0,255) part.Size = Vector3.new(1,4,10) part.Position = Vector3.new(-45,14,1...
input_text: Create an anchored cyan Plastic Block part sized 2x6x4 at position -37,33,28 in Roblox Luau. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(2,6,4) part.Position = Vector3.new(-37...
prompt: Create an unanchored teal Plastic Block part sized 1x1x4 at position -16,82,18 in Roblox Luau. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,128,128) part.Size = Vector3.new(1,1,4) part.Position = Vector3.new(-16,8...
prompt: Create an anchored cyan Plastic Block part sized 12x1x10 at position -15,18,18 in Roblox Luau. end: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,255,255) part.Size = Vector3.new(12,1,10) part.Position = Vector3.new(-15,18...
start: Create a TextLabel saying "Ready?" with FredokaOne font with background Color3.fromRGB(0,0,0) in Roblox GUI. end: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(1,0,0,40) elem.Position...
instruction: Create an unanchored pink Plastic Block part sized 1x2x1 at position 25,13,-7 in Roblox Luau. output_text: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(1,2,1) part.Position = Vector...
prompt: Make a cylinder that is gray and granite at (0,25,5) size (6,2,2) in Roblox. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Cylinder part.Material = Enum.Material.Granite part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(6,2,2) part.Position = Vector3.new(0,25,5) part.Anc...
query: Make a ball that is white and slate at (-10,15,-10) size (8,1,6) in Roblox. output_text: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.Slate part.Color = Color3.new(1,1,1) part.Size = Vector3.new(8,1,6) part.Position = Vector3.new(-10,15,-10) part.Anchored = fal...
input: Create an unanchored yellow Plastic Block part sized 2x1x1 at position -47,95,-27 in Roblox Luau. end: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,255,0) part.Size = Vector3.new(2,1,1) part.Position = Vector3.new(-47,95...
question: Tween a part's color to RGB(234, 32, 56) over 2.6 seconds. output_text: local TweenService = game:GetService("TweenService") local part = workspace:WaitForChild("ColorPart") local tweenInfo = TweenInfo.new(2.6, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) local goal = { Color = Color3.fromRGB(23...
task: Create an anchored green Plastic Block part sized 8x4x4 at position -8,11,24 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,255,0) part.Size = Vector3.new(8,4,4) part.Position = Vector3.new(-8,11,24) pa...
task: Create a TextButton saying "Ready?" with Bangers font with background Color3.fromRGB(40,40,40) in Roblox GUI. result: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0,200,0.1,0) elem.P...
prompt: Tween CFrame with Quart Out easing, 0.75s duration, 2 repeats, non-reversing in Roblox. finish: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(0.75, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 2, false, 0) local goal = {CFrame = part.CFrame*C...
user: Tween Size with Linear InOut easing, 2s duration, 2 repeats, non-reversing in Roblox. end: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 2, false, 0) local goal = {Size = Vector3.new(8,8,8)} lo...
question: Create a TextLabel saying "Pause" with FredokaOne font with background Color3.fromRGB(0,120,255) in Roblox GUI. output_text: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(0.3,0,0.1...
input_text: Set the player's maximum health to 1000 and fully heal them. completion: local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.MaxHealth = 10...
task: Create an anchored brown Wood Block part sized 1x2x1 at position -10,30,34 in Roblox Luau. finish: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(139,69,19) part.Size = Vector3.new(1,2,1) part.Position = Vector3.new(-10,30,34) par...
task: Create a TextButton saying "Yes" with SourceSansBold font with background Color3.fromRGB(50,50,80) in Roblox GUI. output: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0,200,0,50) ele...
start: Create an unanchored blue Plastic Block part sized 10x4x4 at position 31,33,8 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,0,255) part.Size = Vector3.new(10,4,4) part.Position = Vector3.new(31,33,8) ...
prompt: Create a TextLabel saying "Welcome!" with FredokaOne font with background Color3.fromRGB(128,0,255) in Roblox GUI. answer: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(1,0,0.08,0) e...
query: Create a TextLabel saying "Cancel" with SourceSansBold font with background Color3.fromRGB(0,120,255) in Roblox GUI. answer: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(0,200,0,60) ...
prompt: Create a TextButton saying "Score: 0" with FredokaOne font with background Color3.fromRGB(128,0,255) in Roblox GUI. result: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0.5,0,0,40)...
task: Tween CFrame with Sine Out easing, 0.25s duration, infinite repeats, non-reversing in Roblox. finish: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(0.25, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, -1, false, 0) local goal = {CFrame = part.CFra...
start: Create an unanchored white Wood Block part sized 10x4x2 at position 5,7,9 in Roblox Luau. output: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.new(1,1,1) part.Size = Vector3.new(10,4,2) part.Position = Vector3.new(5,7,9) part.Anchored ...
query: Tween CFrame with Exponential InOut easing, 2.5s duration, 1 repeats, reversing in Roblox. output_text: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 1, true, 0) local goal = {CFrame = ...
user: Create an anchored white Plastic Block part sized 4x1x2 at position 49,91,0 in Roblox Luau. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.new(1,1,1) part.Size = Vector3.new(4,1,2) part.Position = Vector3.new(49,91,0) part.An...
start: Create a TextButton saying "Pause" with Michroma font with background Color3.fromRGB(0,120,255) in Roblox GUI. completion: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextButton") elem.Size = UDim2.new(0.5,0,0,50) e...
start: Tween Color with Bounce In easing, 5s duration, infinite repeats, non-reversing in Roblox. response: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(5, Enum.EasingStyle.Bounce, Enum.EasingDirection.In, -1, false, 0) local goal = {Color = Color3.fromR...
user: Create a TextLabel saying "Back" with SourceSansBold font with background Color3.fromRGB(255,128,0) in Roblox GUI. response: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(0.3,0,0.08,0)...
input: Create an unanchored gray Plastic Block part sized 4x6x6 at position -46,44,-43 in Roblox Luau. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(4,6,6) part.Position = Vector3.new(-...
question: Create an unanchored gray Wood Block part sized 8x1x4 at position 0,49,-31 in Roblox Luau. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(8,1,4) part.Position = Vector3.new(0,49,-...
user: Create an anchored gray Wood Block part sized 12x1x1 at position -40,3,-49 in Roblox Luau. solution: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,128,128) part.Size = Vector3.new(12,1,1) part.Position = Vector3.new(-40,3,-49...
query: Tween CFrame with Sine In easing, 3s duration, 2 repeats, reversing in Roblox. completion: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 2, true, 0) local goal = {CFrame = part.CFrame*CFrame.new(0,...
question: Create a TextLabel saying "Delete" with Michroma font with background Color3.fromRGB(40,40,40) in Roblox GUI. model: local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local elem = Instance.new("TextLabel") elem.Size = UDim2.new(0.5,0,0,40) elem....
query: Write a Roblox script to Find all parts inside a Region3 box. completion: local min = Vector3.new(-10, 0, -10) local max = Vector3.new(10, 20, 10) local overlapParams = OverlapParams.new() local parts = workspace:GetPartBoundsInBox( CFrame.new((min + max) / 2), max - min, overlapParams ) for _, p...
question: Create an anchored brown Plastic Block part sized 4x4x2 at position 32,18,11 in Roblox Luau. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(139,69,19) part.Size = Vector3.new(4,4,2) part.Position = Vector3.new(32,18...
query: Create an anchored gold Wood Block part sized 1x4x6 at position -48,17,47 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(255,215,0) part.Size = Vector3.new(1,4,6) part.Position = Vector3.new(-48,17,47) part...
question: Show me how to Implement an OOP class pattern in Luau for a game entity. model: -- ModuleScript: Entity local Entity = {} Entity.__index = Entity export type EntityData = { name: string, health: number, maxHealth: number, damage: number, speed: number, } function Entity.new(data: Entity...
input_text: Tween Size with Cubic InOut easing, 3s duration, 1 repeats, reversing in Roblox. output: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, 1, true, 0) local goal = {Size = Vector3.new(8,8,8)} ...
input_text: Create an unanchored teal Plastic Block part sized 4x1x4 at position -25,81,-11 in Roblox Luau. end: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,128,128) part.Size = Vector3.new(4,1,4) part.Position = Vector3.new(-25...
prompt: Implement a way to a beam connecting two parts. finish: local partA = workspace:WaitForChild("BeamStart") local partB = workspace:WaitForChild("BeamEnd") local attachment0 = Instance.new("Attachment") attachment0.Parent = partA local attachment1 = Instance.new("Attachment") attachment1.Parent = partB local ...
user: Create an unanchored pink Plastic Block part sized 10x6x6 at position -34,14,-1 in Roblox Luau. model: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(10,6,6) part.Position = Vector3.new(-34,...
task: Make a ball that is pink and brick at (-5,10,0) size (2,6,4) in Roblox. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.Brick part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(2,6,4) part.Position = Vector3.new(-5,10,0) part.Anchored = true p...
input: Create an unanchored orange Plastic Block part sized 6x4x10 at position 13,59,15 in Roblox Luau. output_text: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,128,0) part.Size = Vector3.new(6,4,10) part.Position = Vector3.ne...
start: Tween Color with Bounce Out easing, 2s duration, 3 repeats, non-reversing in Roblox. model: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 3, false, 0) local goal = {Color = Color3.fromRGB(255,0,...
user: Create an anchored pink Wood Block part sized 4x6x10 at position 28,33,-36 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(4,6,10) part.Position = Vector3.new(28,33,-36) ...
begin: Create an unanchored pink Wood Block part sized 12x4x10 at position 48,36,-17 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(12,4,10) part.Position = Vector3.new(48,36,...
user: Create an unanchored teal Plastic Block part sized 2x2x10 at position -18,71,-1 in Roblox Luau. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(0,128,128) part.Size = Vector3.new(2,2,10) part.Position = Vector3.new(-18...
input_text: Spawn a blue forcefield ball part at (0,10,-10) size (8,2,2) in Roblox. result: local part = Instance.new("Part") part.Shape = Enum.PartType.Ball part.Material = Enum.Material.ForceField part.Color = Color3.fromRGB(0,0,255) part.Size = Vector3.new(8,2,2) part.Position = Vector3.new(0,10,-10) part.Anchored ...
start: Create a projectile weapon that fires a ball at speed 50 dealing 10 damage on hit. end: local tool = script.Parent local damage = 10 local speed = 50 local debounce = false tool.Activated:Connect(function() if debounce then return end debounce = true local character = tool.Parent local hum...
prompt: Create an anchored pink Plastic Block part sized 2x4x8 at position -29,82,-13 in Roblox Luau. answer: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.fromRGB(255,100,200) part.Size = Vector3.new(2,4,8) part.Position = Vector3.new(-29,...
input: Implement create an anti-cheat speed check in Roblox model: local Players = game:GetService("Players") local MAX_SPEED = 50 local data = {} Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(c) local rp = c:WaitForChild("HumanoidRootPart") data[p.UserId] = {Pos=rp.Position, Time=tic...
question: Tween a part's Size with Exponential Out easing over 2s in Roblox finish: local TweenService = game:GetService("TweenService") local part = workspace.MyPart local info = TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out) local goal = {Size = Vector3.new(8,8,8)} local tween = TweenServic...
question: Create an unanchored purple Wood Block part sized 10x2x10 at position 3,68,-23 in Roblox Luau. completion: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Wood part.Color = Color3.fromRGB(128,0,255) part.Size = Vector3.new(10,2,10) part.Position = Vector3.new(...
input_text: Create an unanchored black Plastic Block part sized 4x2x2 at position -4,72,45 in Roblox Luau. response: local part = Instance.new("Part") part.Shape = Enum.PartType.Block part.Material = Enum.Material.Plastic part.Color = Color3.new(0,0,0) part.Size = Vector3.new(4,2,2) part.Position = Vector3.new(-4,72,4...
begin: Make a teal Concrete part with a SpotLight effect attached in Roblox Luau. end: local part = Instance.new("Part") part.Material = Enum.Material.Concrete part.Color = Color3.fromRGB(0,128,128) part.Size = Vector3.new(4,4,4) part.Position = Vector3.new(0,5,0) part.Anchored = true part.Parent = workspace local fx ...