Project

rogems

0.0
No release in over a year
A Ruby to Lua transpiler for compiling Ruby scripts into Roblox code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme
build_ci Gem Version

RoGems

RoGems is a Ruby to Lua transpiler written for use with Roblox (like roblox-ts) It is unfinished.

Examples

See examples for more

Lava Bricks

Ruby Source

collection = game.GetService("CollectionService")
lava_bricks = collection.GetTagged("Lava")

lava_bricks.each do |lava|
    lava.Touched.Connect do |hit|
        parent = hit.Parent
        humanoid = parent.FindFirstChildOfClass("Humanoid")
        if !humanoid.nil? then
            humanoid.TakeDamage(humanoid.Health)
        end
    end
end

Lua Output

local ruby = require(game.ReplicatedStorage.Ruby.Runtime)

local collection = game:GetService("CollectionService")
local lava_bricks = collection:GetTagged("Lava")
for lava in ruby.list(lava_bricks) do
    (type(lava.Touched) == "function" and lava:Touched() or lava.Touched):Connect(function(hit)
        local parent = (type(hit.Parent) == "function" and hit:Parent() or hit.Parent)
        local humanoid = parent:FindFirstChildOfClass("Humanoid")
        if humanoid == nil then
            humanoid:TakeDamage((type(humanoid.Health) == "function" and humanoid:Health() or humanoid.Health))
        end
    end)
end