Roblox Resources

Looking for a code snippit library to use for your Roblox Studio game? Look no further! Below is a collection of scripts designed to work in your Roblox games, just make sure you follow the instructions! We also have world downloads for various challenges and examples of the more complex scripts.

World Downloads

Activities

Examples

Copy & Paste Scripts

Kill Block

Script File as Child of Part to be Kill Block

script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent:BreakJoints() end end)

Fall Block

Script File as Child of Part to be Fall Block

script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then wait(1) script.Parent.Anchored = false end end)

Fall Block that Goes Back

Script file as a Child of Part to be Fall Block, there are two variables to control the delay before fall and delay before respawning

local delayToFall = 1 local delayToRespawn = 3 local x = script.Parent.Position.X local y = script.Parent.Position.Y local z = script.Parent.Position.Z local ox = script.Parent.Orientation.X local oy = script.Parent.Orientation.Y local oz = script.Parent.Orientation.z script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then wait(delayToFall) script.Parent.Anchored = false wait(delayToRespawn) script.Parent.Anchored = true script.Parent.CanCollide = false script.Parent.Position = Vector3.new(x, y, z) script.Parent.Orientation = Vector3.new(ox, oy, oz) script.Parent.CanCollide = true end end)

Ball Drop on Touch

script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then for i = 0, 1000, 1 do gen() wait(.001) end end end) function gen() local domino = Instance.new("Part") domino.BrickColor = BrickColor.Random() local num = math.random(5,30) domino.Size = Vector3.new(num, num, num) local sparkle = Instance.new("Sparkles") sparkle.Parent = domino sparkle.Color = Color3.new(math.random(0,1), math.random(0,1), math.random(0,1)) domino.Position = Vector3.new(math.random(-5,5), 200, math.random(-5,5)) domino.Name = "domino" domino.CastShadow = false domino.Transparency = .5 domino.Reflectance = .1 domino.Material = Enum.Material.Basalt domino.Shape = Enum.PartType.Ball domino.Parent = game.Workspace end