This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRayEntranceAndExit(pos, dir, distance) | |
local ignore = deepcopy(_G.ignorelist) | |
local Ray1 = Ray.new(pos, dir.unit*distance) | |
local obj, enter, enterface = workspace:FindPartOnRayWithIgnoreList(Ray1, _G.ignorelist) | |
if obj ~= nil then | |
table.insert(ignore, obj) | |
end | |
local Ray2 = Ray.new(enter, dir.unit*distance) | |
local _, hpos2 = workspace:FindPartOnRayWithIgnoreList(Ray2, ignore) | |
local Ray3 = Ray.new(hpos2, CFrame.new(hpos2, enter).lookVector.unit*distance) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug = true | |
player = { | |
x = 64; | |
y = 500; | |
Speed = 250; | |
Texture = nil; | |
} | |
isAlive = true | |
score = 0 | |
highscore = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug = true | |
player = { | |
x = 64; | |
y = 500; | |
Speed = 250; | |
Texture = nil; | |
} | |
isAlive = true | |
score = 0 | |
highscore = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug = true | |
player = { | |
x = 64; | |
y = 500; | |
Speed = 250; | |
Texture = nil; | |
} | |
isAlive = true | |
score = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local chars = "abcdefghijklmnopqrstuvwxyz0123456789" | |
function flipCoin() | |
local bools = {true, false} | |
return bools[math.random(1, #bools)] | |
end | |
function randChar() | |
local n = math.random(1, 36) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local chars = "abcdefghijklmnopqrstuvwxyz0123456789" | |
function flipCoin() | |
local bools = {true, false} | |
return bools[math.random(1, #bools)] | |
end | |
function randChar() | |
local n = math.random(1, 36) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mx, my | |
function love.load() | |
end | |
function love.update(dt) | |
mx, my = love.mouse.getPosition() | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A slightly edited version of https://github.com/Vorlias/ROBLOX-ModuleScripts/blob/master/Lua-OOP/ModObject.rbxs | |
ModObject = { | |
Version = 1.4; | |
EnableStructConstructor = true; | |
}; | |
CustomObjects = { | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Signal = {} | |
local mobj = require("ModObject") | |
function Signal.New() | |
local sig = Signal:Init() | |
sig.connection = nil | |
return sig | |
end | |
function Signal:Connect(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Inventory = {} | |
local mobj = require("System/Libraries/ModObject") | |
local Signal = require("System/Classes/Signal") | |
Inventory.ItemAdded = Signal.New() | |
Inventory.ItemRemoved = Signal.New() | |
function Inventory.Create(itemsTable) | |
local inv = Inventory:Init() |
OlderNewer