Skip to content

Instantly share code, notes, and snippets.

--!strict
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local InsertService = game:GetService("InsertService")
local Selection = game:GetService("Selection")
local props = {
"Name",
"Color",
"CFrame",
@Vlewv
Vlewv / RunContext.luau
Created August 10, 2024 22:39 — forked from MaximumADHD/RunContext.luau
RunContext - What's the running context of your code?
--!strict
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
local RunService = game:GetService("RunService")
local VRService = game:GetService("VRService")
local isEdit = false
local isServer = RunService:IsServer()
local isClient = RunService:IsClient()
@Vlewv
Vlewv / DynamicMesh.lua
Created August 10, 2024 22:38 — forked from grilme99/DynamicMesh.lua
Example of Roblox's new DynamicMesh class, generated using ChatGPT. Works at runtime in an ordinary LocalScript.
-- Create a new DynamicMesh instance
local dynamicMesh = Instance.new("DynamicMesh")
-- Function to get perlin noise
local function perlinNoise(x, y, scale, height)
return math.noise(x * scale, y * scale) * height
end
local size = 50 -- Size of the terrain
local scale = 0.1 -- Scale factor for Perlin noise