Roblox Studio · Luau
Roblox scripts from one sentence
Describe what your script should do. AI writes ready-to-use code for Roblox Studio.
Also available: a website generator that builds a page from your description.
Door that opens on interaction for 3 seconds
-- Script inside a Part named "Door"local door = script.Parentlocal prompt = Instance.new("ProximityPrompt")prompt.ActionText = "Open"prompt.Parent = doorprompt.Triggered:Connect(function() prompt.Enabled = false door.Transparency = 0.6 door.CanCollide = false task.wait(3) door.Transparency = 0 door.CanCollide = true prompt.Enabled = trueend)Coin that gives +1 and respawns after 10 seconds
-- Script in one anchored Part (one coin)local Players = game:GetService("Players")local coin = script.Parentlocal ready = truePlayers.PlayerAdded:Connect(function(player) local stats = Instance.new("Folder") stats.Name = "leaderstats" stats.Parent = player local coins = Instance.new("IntValue") coins.Name = "Coins" coins.Parent = statsend)coin.Touched:Connect(function(hit) local character = hit.Parent local player = Players:GetPlayerFromCharacter(character) if not ready or not player then return end ready = false player.leaderstats.Coins.Value += 1 coin.Transparency = 1 task.wait(10) coin.Transparency = 0 ready = trueend)Trap that defeats the player who touches it
-- Script inside an anchored Part (the trap)local Players = game:GetService("Players")local trap = script.Parentlocal COOLDOWN = 2 -- secondslocal ready = truetrap.Touched:Connect(function(hit) local model = hit.Parent if not Players:GetPlayerFromCharacter(model) then return end local human = model:FindFirstChildOfClass("Humanoid") if not ready or not human then return end if human.Health <= 0 then return end ready = false human.Health = 0 task.wait(COOLDOWN) ready = trueend)Sword for 3 coins. Needs the coin script and a Tool named Sword in ServerStorage
-- Script inside a Part (the shop counter)local Storage = game:GetService("ServerStorage")local PRICE = 3local prompt = Instance.new("ProximityPrompt")prompt.ActionText = "Buy sword: " .. PRICEprompt.Parent = script.Parentprompt.Triggered:Connect(function(player) local stats = player:FindFirstChild("leaderstats") local coins = stats and stats:FindFirstChild("Coins") local sword = Storage:FindFirstChild("Sword") local bag = player:FindFirstChild("Backpack") if not (coins and sword and bag) then return end if bag:FindFirstChild("Sword") then return end local char = player.Character if char and char:FindFirstChild("Sword") then return end if coins.Value < PRICE then return end coins.Value -= PRICE sword:Clone().Parent = bagend)- 3 free credits, no card needed
- Works in Roblox Studio
- Use the code in your games
- Made in Poland
How it works
- 1
Describe what the script should do
- 2
AI writes the Luau code
- 3
Copy it into Roblox Studio
Example
“A shop where I buy a sword for coins”
Sample output
-- Script in ServerScriptService. Needs a Part named "SwordShop"
-- in Workspace and a Tool named "Sword" in ServerStorage.
-- Settings
local PRICE = 50 -- price of the sword, in coins
local START_COINS = 100 -- coins every player starts with
local BUY_DISTANCE = 12 -- how close the player must be to buy, in studs
local PROMPT_DISTANCE = 20 -- the button shows from further, to explain "too far"
local MESSAGE_TIME = 2 -- how long a message stays on screen, in seconds
local TEXT_TOO_FAR = "You are too far away"
local TEXT_NO_COINS = "Not enough coins"
local TEXT_HAS_SWORD = "You already have the sword"
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
local Debris = game:GetService("Debris")
local shop = workspace:WaitForChild("SwordShop")
local sword = ServerStorage:WaitForChild("Sword")
local function addCoins(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = START_COINS
coins.Parent = stats
end
Players.PlayerAdded:Connect(addCoins)
for _, player in Players:GetPlayers() do addCoins(player) end
-- An on-screen message that only this player sees
local function showMessage(player, text)
local playerGui = player:FindFirstChildOfClass("PlayerGui")
if not playerGui then return end
local old = playerGui:FindFirstChild("ShopMessage")
if old then old:Destroy() end
local screen = Instance.new("ScreenGui")
screen.Name = "ShopMessage"
local label = Instance.new("TextLabel")
label.Size = UDim2.fromScale(0.6, 0.07)
label.Position = UDim2.fromScale(0.2, 0.15)
label.TextScaled = true
label.Text = text
label.Parent = screen
screen.Parent = playerGui
Debris:AddItem(screen, MESSAGE_TIME)
end
local prompt = Instance.new("ProximityPrompt")
prompt.ActionText = "Buy sword (" .. PRICE .. " coins)"
prompt.MaxActivationDistance = PROMPT_DISTANCE
prompt.Parent = shop
-- The server checks everything before taking the coins
prompt.Triggered:Connect(function(player)
local coins = player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Coins")
local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
local backpack = player:FindFirstChildOfClass("Backpack")
if not (coins and root and backpack) then return end
if (root.Position - shop.Position).Magnitude > BUY_DISTANCE then
showMessage(player, TEXT_TOO_FAR)
elseif backpack:FindFirstChild(sword.Name) or player.Character:FindFirstChild(sword.Name) then
showMessage(player, TEXT_HAS_SWORD)
elseif coins.Value < PRICE then
showMessage(player, TEXT_NO_COINS)
else
coins.Value -= PRICE
sword:Clone().Parent = backpack
end
end)
Pricing
Free
$0
- 3 credits to start
- Script: 1 credit, website: 5 credits
Starter
$2.50/mo
- 20 credits per month
- Recommended
Pro
$6.50/mo
- 80 credits per month
Max
$13/mo
- 150 credits per month
- Early access to new features, e.g. 3D models
Roblox script = 1 credit, Fix script = 1 credit, website = 5 credits
Paid plans are not available yet. Prices and limits are approximate.
Frequently asked questions
What is Farlacy?
A tool that turns a one-sentence description into a ready-to-paste script for Roblox Studio. It can also build simple websites.
Is it free?
Create a free account and you get 3 credits to start. A Roblox script costs 1 credit, a website 5 credits. Paid plans are not available yet.
How do I use a script in Roblox Studio?
Copy the code. The comment at the top says which script type to add (usually a Script) and where. Add it there in Studio, paste the code and press Play.
Do I need to know how to code?
No, but knowing the basics of Roblox Studio helps, for example how to add a Part or a Script.
Do scripts always work without changes?
Not always. AI can make mistakes, so always test the script in Studio before using it in your game.
Which languages does it support?
The site is available in English and Polish. Comments in the scripts are written in the language of your description.