Skip to content

Instantly share code, notes, and snippets.

View SigmaThetaTech's full-sized avatar

SigmaTech SigmaThetaTech

View GitHub Profile
@SigmaThetaTech
SigmaThetaTech / FormService.luau
Created November 7, 2024 00:39
For Bitwise / Andrea - FormService fix
local Players = game:GetService("Players")
local TextService = game:GetService("TextService")
local HttpService = game:GetService("HttpService")
local DataStoreService = game:GetService("DataStoreService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local FormRemote = Instance.new("RemoteFunction")
FormRemote.Name = "FormRemote"
FormRemote.Parent = ReplicatedStorage
@SigmaThetaTech
SigmaThetaTech / BasicMoveToolController.lua
Created May 17, 2024 20:48
Sample code for a controller by SigmaTech
--!strict
-- Authors: ΣTΞCH (SigmaTech)
-- May 02, 2024
--[[
BasicMoveToolController.lua
(PURPOSE OF THIS FILE)
[API]
@SigmaThetaTech
SigmaThetaTech / Dot Product Algorithm.py
Created May 17, 2023 21:11
Algorithm for finding the dot product of 2 arrays written in Python for MIT Open Learning Library on Machine Learning (MITx - 6.036)
# Written by SigmaTech
# Beat a Computer Science graduate at desigining this algorithm at the same start time
# Make sure that the columns of M1 match the rows of M2
# Create an answer array M3
# For each entry (array) of M1,
def getRowsColumns(V):
return (len(V), len(V[0]))
--!strict
--October 07, 2022
-- By SigmaTech
--[[
BaseTool.lua
To provide a basic code foundation for all the tools in the game
Tools will inherit this base tool and add functionality on top of it.
[API]
-- event Middleware
-- AvataX / OverHash
-- September 25, 2020
-- Replicates actions to client via RemoteEvent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Network = ReplicatedStorage:FindFirstChild("Network")
local storeChangeEvent
if not Network then
local Folder = Instance.new("Folder")
@SigmaThetaTech
SigmaThetaTech / RPCService.lua
Last active January 6, 2021 08:16
This script is the parent of a bunch of modules that return functions. This script connects all those functions to AGF remotes.
local RPCService = {}
local moduleChildren = script:GetChildren()
function RPCService:Start()
for _, module in pairs(self.modules) do
local requiredFunction = require(module)
assert(typeof(requiredFunction) == "function", "The module " .. tostring(module) .. " did not return a function.")
self:ConnectClientEvent(module.Name, requiredFunction)
end
end
@SigmaThetaTech
SigmaThetaTech / Spherical To Rectangular Coordinates.lua
Last active May 17, 2023 21:36
Helper functions for conversion of spherical to rectangular coordinates and plotting
--[[
SPHERICAL TO RECTANGULAR COORDINATES
This algorithm takes sphereical coordinates, which are helpful for defining spray patterns at a defined radius relative to the shooter,
and converts them to cartesian coordinates that Roblox can easilly understand and plot.
(https://www.mathworks.com/help/symbolic/transform-spherical-coordinates-and-plot.html)
Illustrations:
https://gyazo.com/bc7e68c8874bd063f76a2e72263f1109
https://gyazo.com/2abe1234d04ed51eb1df045b36d59f0d
@SigmaThetaTech
SigmaThetaTech / Conical Spiral Plotter.lua
Created December 4, 2020 20:04
Creates a conical spiral in Roblox!
local CONE_HEIGHT = 10
local CONE_ANGLE = 30
local FREQUENCY = 10
local theta = math.rad(CONE_ANGLE)
function f(z)
z = -z
local newPosition = Vector3.new(
math.tan(theta) * z * math.cos(FREQUENCY * z),
@SigmaThetaTech
SigmaThetaTech / Roact-Rodux Complete Example
Created October 4, 2020 23:26
A complete example of a Roact-Rodux application that would run in a LocalScript within StarterPlayerScripts. Roact and Rodux are required to be within ReplicatedStorage.
--[[
This is a complete example of Roact-Rodux that will create a
TextButton that will increment its text when its .Activated event is fired!
]]
--Init
local RS = game:GetService("ReplicatedStorage")
local Roact = require(RS:WaitForChild("Roact"))
local Rodux = require(RS:WaitForChild("Rodux"))
local RoactRodux = require(RS:WaitForChild("RoactRodux"))
@SigmaThetaTech
SigmaThetaTech / Roblox Virus Nuker ☢
Last active October 4, 2020 23:28
For when your game gets infected with viruses. Select objects in question in studio and then run this in the command bar to nuke known virus script names
selection = game.Selection:Get()
local function quarantine(instance)
print("Destroying " .. instance.ClassName .. " named " .. instance.Name)
end
for i, v in pairs(selection) do
for i, descendant in pairs(v:GetDescendants()) do
if descendant:IsA("Script") then
if descendant.Name == "Vaccine" then