banner



How To Create Things In Roblox

Tutorial page

This article is an advanced tutorial.

Note: This tutorial is on how to make custom Gear. There is a lot of scripting and building, so if you are a beginner, stay away.

Anyway, this is Relorelo84 (Dronian)'s tutorial on how to make your own custom Gear. First, I'll be showing you how to make a jetpack out of anything (even a noob's head, because why not?). There's a ranking of how hard the tutorial is, on a scale of 5.

  1. Very Easy
  2. Easy
  3. Medium
  4. Hard
  5. Very Hard

This also includes ColorfulBrendon(ColorfulBrendonROBLOX)'s and A84hg's tutorials, so I hope you enjoy the collaboration, and have a great time making gear such as jetpacks, Swords, and much more!

Contents

  • 1 Tutorial 1: Jetpack
    • 1.1 Part 1: Making the actual jetpack
    • 1.2 PART 2: The jetpack's sounds
    • 1.3 PART 3: GUI time
    • 1.4 PART 4: The script
  • 2 Tutorial 2: Bloxy Cola
    • 2.1 Step 1: Making the Bloxy Cola
    • 2.2 Step 2: Sounds
    • 2.3 Step 3: The script
  • 3 Tutorial 3: Noob Boy Part 1
    • 3.1 Step 1: Making the console
    • 3.2 Step 2: Adding the four sounds
    • 3.3 Step 3: The script
    • 3.4 Step 4: GameGui and ScoreFrame.
  • 4 Tutorial 4: Making a Sword
  • 5 How to make Custom Message-Spawning Buttons
  • 6 Tutorial 5: Trowel
    • 6.1 The beginning
    • 6.2 BrickCleanup
    • 6.3 WallMaker
    • 6.4 Local Gui
    • 6.5 Handle, Sounds, and Mesh
  • 7 Tutorial 6: Timebomb
    • 7.1 Bomb
    • 7.2 PlantBomb

Tutorial 1: Jetpack

Have you ever seen the US Military Top Secret Experimental Jetpack on Free Models? If so, have you wanted to have a jetpack in your place similar to that, but you're very infamous for stealing free models? Well, here's how to make one. This tutorial rates 4 (Hard).

Part 1: Making the actual jetpack

First, go to Insert, then select Object. A pop-up window shall appear, with lots of things to put in. Scroll right until you see the option to insert a Tool. Click it. It should appear in the StarterPack. If it doesn't, drag it into the StarterPack. Select it, and rename it anything that's appropriate. Then, put a brick into the Tool, and rename it "Handle" without quotes. The possibilities for your hand-made Jetpack are quite frankly endless; The head of a noob or guest, a meshed object, or even a hat. Make sure it's unanchored, or you will be stuck in the ground when you test it out. Now, click on the name of your jetpack. Go back to the Objects window again. Add four sounds inside the Handle (do not add them into the tool, or you'll mess it up). Rename them EngineFail, InitialThrust, LowFuelWarning, and Thrusting.

PART 2: The jetpack's sounds

Add another object to the Tool this time; a NumberValue. Make the name CurrFuel. In the bar that says Value, put any type of fuel you like. For example, I'll put 20000 fuel (do not put any commas in!). Now, it's time to add the sounds to your jetpack. Put these codes for the four sound's Sound IDs:

  • EngineFail: http://www.roblox.com/asset/?id=30624305
  • InitialThrust: http://www.roblox.com/asset/?id=30624262
  • LowFuelWarning: http://www.roblox.com/asset/?id=30624357
  • Thrusting: http://www.roblox.com/asset/?id=30624426

Testing it out will prove that it's VERY unfinished. Well, we need to add two more things to our custom-made jetpack; the GUI for the fuel and the script that puts everything together.

PART 3: GUI time

There's two GUI objects in the jetpack you need to add; standstill and FuelGui. In your Jetpack TOOL, add an Animation. Name it "standstill" without the quotes. In the AnimationId, put in "f5c060f01391b53f42d43c28d722cfab" without the quotes. One G.U.I. down, one to go.

Add a ScreenGui and rename it FuelGui. This is crucial, because it tells you how much Fuel you have. In FuelGui, put in a Frame and an ImageLabel. DO NOT RENAME THESE. Put these stats in for Frame:

  • BackgroundColor3: 255; 255; 255
  • BorderColor3: 0; 0; 0
  • BorderSizePixel: 0
  • Position: {0.900000036, 0}, {0.200000003, 0}
  • Size: {0, 40}, {0, 300}

You finished the first one, now for the second.

  • BackgroundColor3: 255; 255; 255
  • BackgroundTransparency: 1
  • BorderColor3: 0; 0; 0
  • BorderSizePixel: 0
  • Image: http://www.roblox.com/asset/?id=30559074
  • Position: {0.900000036, 0}, {0.200000003, 0}
  • Size: {0, 40}, {0, 300}

Testing it again, it's still broken! Well, that's because we have one last thing to do. We need to put in the code that holds it all together.

PART 4: The script

Okay, here comes a lot of code. Remember that local maxFuel has to be the same as CurrFuel. Make a LocalScript, and put this in.

local Tool = script.Parent local mass = 0 local player = nil local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass local gravity = .75—things float at > 1 local moving = false local maxFuel = 20000  local fuel = Tool.CurrFuel.Value  local gui = nil  local anim = nil  local jetPack = nil  local regen = false  local force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,0,0)  local bodyGyro = Instance.new("BodyGyro") bodyGyro.P = 20000 bodyGyro.D = 8000 bodyGyro.maxTorque = Vector3.new(bodyGyro.P,bodyGyro.P,bodyGyro.P)  local cam = nil  local Flame = nil  function onEquippedLocal(mouse)  player = Tool.Parent mass = recursiveGetLift(player) force.P = mass * 10 force.maxForce = Vector3.new(0,force.P,0) mouse.Button1Down:connect(thrust) mouse.Button1Up:connect(cutEngine) cam = game.Workspace.CurrentCamera anim = player.Humanoid:LoadAnimation(Tool.standstill) anim:Play() gui = Tool.FuelGui:clone() updateGUI() gui.Parent = game.Players:GetPlayerFromCharacter(player).PlayerGui equipPack()  regen = true regenFuel()  end  function equipPack()  jetPack = Tool.Handle:clone() jetPack.CanCollide = false jetPack.Name = "JetPack"  jetPack.Parent = game.Workspace  Tool.Handle.Transparency = 1  local welder = Instance.new("Weld") welder.Part0 = jetPack welder.Part1 = player.Torso welder.C0 = CFrame.new(Vector3.new(0,0,-1)) welder.Parent = jetPack  Flame = Instance.new("Part") Flame.Name = "Flame" Flame.Transparency =1 Flame.CanCollide = false Flame.Locked = true Flame.formFactor = 2 Flame.Size = Vector3.new(1,0.4,1) Flame.Parent = jetPack  local Fire = Instance.new("Fire") Fire.Heat = -20 Fire.Size = 6 Fire.Enabled = false Fire.Parent = Flame  local firer = Instance.new("Weld") firer.Part0 = jetPack.Flame firer.Part1 = jetPack firer.C0 = CFrame.new(Vector3.new(0,2,0)) firer.Parent = jetPack.Flame  end  function updateGUI()  gui.Frame.Size = UDim2.new(0,40,0,300 * (Tool.CurrFuel.Value/maxFuel)) gui.Frame.Position = UDim2.new(0.9,0,0.2 + (0.2 * ((maxFuel - Tool.CurrFuel.Value)/maxFuel)),0)  end  function onUnequippedLocal()  regen = false force:remove() bodyGyro:remove() anim:Stop() anim:remove() gui:remove() if jetPack ~= nil then jetPack:remove() jetPack = nil end Tool.Handle.Transparency = 0  end  function thrust() if fuel > 0 then thrusting = true force.Parent = player.Torso jetPack.Flame.Fire.Enabled = true Tool.Handle.InitialThrust:Play() bodyGyro.Parent = player.Torso while thrusting do bodyGyro.cframe = cam.CoordinateFrame force.velocity = Vector3.new(0,cam.CoordinateFrame.lookVector.unit.y,0) * 50  fuel = fuel - 1 Tool.CurrFuel.Value = fuel if fuel <= 0 then Tool.Handle.EngineFail:Play() cutEngine() end updateGUI() wait()  Tool.Handle.Thrusting:Play()  if fuel <= 1 then Tool.Handle.LowFuelWarning:Play() end end Tool.Handle.Thrusting:Stop() Tool.Handle.LowFuelWarning:Stop() end end  function cutEngine() thrusting = false jetPack.Flame.Fire.Enabled = false force.velocity = Vector3.new(0,0,0) force.Parent = nil anim:Stop() bodyGyro.Parent = nil end  Tool.Equipped:connect(onEquippedLocal) Tool.Unequipped:connect(onUnequippedLocal)  local head = nil function recursiveGetLift(node) local m = 0 local c = node:GetChildren() if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end—nasty hack to detect when your parts get blown off  for i=1,#c do if c[i].className == "Part" then if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then—GROSS if c[i].Name == "Handle" then m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height else m = m + (c[i]:GetMass() * equalizingForce * gravity) end end end m = m + recursiveGetLift(c[i]) end return m end  function regenFuel()  while regen do if fuel < maxFuel then fuel = fuel + 1 Tool.CurrFuel.Value = fuel updateGUI() end wait(0.2) end  end        

Test it out, and it works perfectly! Check in for my second tutorial, where I'll show you how to make your own Bloxy Cola.

Tutorial 2: Bloxy Cola

This tutorial ranks 2 (Easy).

Step 1: Making the Bloxy Cola

Go to Insert, select Object, and click on Tool. A tool should pop up. Drag it into your StarterPack, and name it whatever you want. For example, I'll name mine the Shedletsky Cola. Add a 1x1 brick/head/mesh into the tool and name it Handle. Make sure it's unanchored.

Step 2: Sounds

Now you've gotten the handle done, but now it's time to add the sounds. Go to Insert, select Object, and make two Sounds. Name one DrinkSound and name the other OpenSound, but put them in the handle of the Bloxy Cola. In the SoundIDs, put these for the sounds;

  • DrinkSound: http://www.roblox.com/asset/?id=10722059
  • OpenSound: http://www.roblox.com/asset/?id=10721950

Now, here comes the final part; the script.

Step 3: The script

Insert a script into the tool, and name it BloxyColaScript. Put this into the script;

local Tool = script.Parent;  enabled = true   function onActivated()  if not enabled  then   return  end   enabled = false  Tool.GripForward = Vector3.new(0,-.759,-.651)  Tool.GripPos = Vector3.new(1.5,-.5,.3)  Tool.GripRight = Vector3.new(1,0,0)  Tool.GripUp = Vector3.new(0,.651,-.759)   Tool.Handle.DrinkSound:Play()   wait(3)    local h = Tool.Parent:FindFirstChild("Humanoid")  if (h ~= nil) then   if (h.MaxHealth > h.Health + 5) then    h.Health = h.Health + 5   else     h.Health = h.MaxHealth   end  end   Tool.GripForward = Vector3.new(-.976,0,-0.217)  Tool.GripPos = Vector3.new(0.03,0,0)  Tool.GripRight = Vector3.new(.217,0,-.976)  Tool.GripUp = Vector3.new(0,1,0)   enabled = true  end  function onEquipped()  Tool.Handle.OpenSound:play() end  script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped)        

Test it out, and you've just made your very own custom Bloxy Cola! In the next tutorial, you'll learn how to make one of the most advanced gears of all time; The Adventures of Noob Boy: Part 1.

Tutorial 3: Noob Boy Part 1

This tutorial rates a 5 (Very Hard).

Step 1: Making the console

Insert a tool, and call it whatever you want. Now, add a 1x1 brick called Handle into the tool, but make sure it's unanchored. Now, it's time to add four sounds.

Step 2: Adding the four sounds

In the handle, add four Sounds; Fail, Jump, Prize, and Song. For the SoundIds, put these in;

  • Fail: http://www.roblox.com/asset/?id=32202382
  • Jump: http://www.roblox.com/asset/?id=32201677
  • Prize: http://www.roblox.com/asset/?id=32201701
  • Song: http://www.roblox.com/asset/?id=32200781

We've added the sounds, but the tutorial is far from over.

Step 3: The script

You might be wondering; Why add the script now? Well, it's best to do this first because the script's actually easier than adding the GUIs! Make a LocalScript and put this in;

local Tool = script.Parent local gui = nil local mapParts = {} local player = nil  local keyDownCon = nil local keyUpCon = nil local clickCon = nil  local platforming = false  local time = 0  local gaming = true  local head = nil  local left = false local right = false local jump = false  local prize = nil local prizeRegenTimer = 0  local walkCounter = 0 local playerWalkForward = {"32171523","32171543","32171566","32171582","32171594"} local playerWalkBackward = {"32168430","32168450","32168470","32168483","32168492"}  local playerVelocity = Vector2.new(0,0)  function onEquipped(mouse)   Tool.Handle.Song:Stop()  Tool.Handle.Jump:Stop()  Tool.Handle.Prize:Stop()  Tool.Handle.Fail:Stop()  enabled = false   gui = Tool.GameGui:clone()  player = gui.Cabinet.Screen.Player  mapParts = gui.Cabinet.Screen.Map:GetChildren()   keyDownCon = mouse.KeyDown:connect(onKeyDown)  keyUpCon = mouse.KeyUp:connect(onKeyUp)  clickCon = gui.Cabinet.SoundOnOff.MouseButton1Click:connect(soundChanger)   if Tool.Handle.Song.Volume == 0 then   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203595"  else   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203454"  end   head = Tool.Parent:FindFirstChild("Head")  end  Tool.Equipped:connect(onEquipped)  function onUnequipped()   gaming = false  head.Anchored = false   Tool.Handle.Song:Stop()  Tool.Handle.Jump:Stop()  Tool.Handle.Prize:Stop()  Tool.Handle.Fail:Stop()   game.Workspace.CurrentCamera.CameraType = 5  gui:remove()   keyDownCon:disconnect()  keyUpCon:disconnect()  clickCon:disconnect()  clickCon = nil  keyDownCon = nil  keyUpCon = nil  end  Tool.Unequipped:connect(onUnequipped)  local enabled = false  function onActivated()   if enabled then return end   enabled = true   game.Workspace.CurrentCamera.CameraType = 1  head.Anchored = true  prize = nil  prizeRegenTimer = 0  time = 0  gui.Parent = game.Players:GetPlayerFromCharacter(Tool.Parent).PlayerGui   Tool.Handle.Song:Play()    gameLoop()    Tool.Handle.Song:Stop()  gui:remove()  gui = Tool.GameGui:clone()  clickCon = gui.Cabinet.SoundOnOff.MouseButton1Click:connect(soundChanger)  if Tool.Handle.Song.Volume == 0 then   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203595"  else   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203454"  end  player = gui.Cabinet.Screen.Player  mapParts = gui.Cabinet.Screen.Map:GetChildren()  game.Workspace.CurrentCamera.CameraType = 5  head.Anchored = false   enabled = false  end  Tool.Activated:connect(onActivated)  function soundChanger()   if gui.Cabinet.SoundOnOff.Image == "http://www.roblox.com/asset/?id=32203454" then   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203595"   Tool.Handle.Song.Volume = 0   Tool.Handle.Jump.Volume = 0   Tool.Handle.Prize.Volume = 0   Tool.Handle.Fail.Volume = 0  else   gui.Cabinet.SoundOnOff.Image = "http://www.roblox.com/asset/?id=32203454"   Tool.Handle.Song.Volume = 0.5   Tool.Handle.Jump.Volume = 0.5   Tool.Handle.Prize.Volume = 0.5   Tool.Handle.Fail.Volume = 0.5  end  end  function onKeyDown(key)   key:lower()  if key == "a" then   left = true   right = false  elseif key == "d" then   left = false   right = true  elseif key == "w" then   jump = true  end  end  function onKeyUp(key)    key:lower()  if key == "a" then   left = false  elseif key == "d" then   right = false  elseif key == "w" then   jump = false  end  end  function Physics()   if playerVelocity.y < 8 then   playerVelocity = Vector2.new(playerVelocity.x,playerVelocity.y + 1)  end  if playerVelocity.y > 1 then   platforming = false  end  local enemies = gui.Cabinet.Screen.Enemies:GetChildren()  for i = 1, #enemies do   enemies[i].Position = UDim2.new(0,enemies[i].Position.X.Offset,0,enemies[i].Position.Y.Offset + 5)  end  end  function Touching(a,b)  local ap = Vector2.new(a.Position.X.Offset, a.Position.Y.Offset)  local as = Vector2.new(a.Size.X.Offset, a.Size.Y.Offset)  local bp = Vector2.new(b.Position.X.Offset, b.Position.Y.Offset)  local bs = Vector2.new(b.Size.X.Offset, b.Size.Y.Offset)  local c = (ap.x + as.x > bp.x) and (bp.x + bs.x > ap.x) and (ap.y + as.y > bp.y) and (bp.y + bs.y > ap.y)  if c then   return true  else   return false  end end   function Collision()   -- check player against map  for i = 1, #mapParts do    if Touching(mapParts[i],player) then     if player.Position.X.Offset < mapParts[i].Position.X.Offset and not platforming then     player.Position = UDim2.new(0, mapParts[i].Position.X.Offset - player.Size.X.Offset,0,player.Position.Y.Offset)     playerVelocity = Vector2.new(0,playerVelocity.y)    elseif player.Position.X.Offset + player.Size.X.Offset > mapParts[i].Position.X.Offset + mapParts[i].Size.X.Offset and not platforming then     player.Position = UDim2.new(0, mapParts[i].Position.X.Offset + mapParts[i].Size.X.Offset,0,player.Position.Y.Offset)     playerVelocity = Vector2.new(0,playerVelocity.y)    else     if player.Position.Y.Offset > mapParts[i].Position.Y.Offset then      playerVelocity = Vector2.new(playerVelocity.x,10)      platforming = false     elseif player.Position.Y.Offset + player.Size.Y.Offset > mapParts[i].Position.Y.Offset then      platforming = true      playerVelocity = Vector2.new(playerVelocity.x,0)     end    end    end   end—check enemies against map, player  local enemies = gui.Cabinet.Screen.Enemies:GetChildren()  for i = 1, #enemies do   for j = 1, #mapParts do    if Touching(mapParts[j],enemies[i]) then     enemies[i].Position = UDim2.new(0,enemies[i].Position.X.Offset,0,mapParts[j].Position.Y.Offset - enemies[i].Size.Y.Offset)    end   end   if enemies[i].Position.X.Offset > 384 or enemies[i].Position.X.Offset < 0  then    if enemies[i].Position.Y.Offset > 230 then     enemies[i]:remove()    else     enemies[i].Left.Value = not enemies[i].Left.Value    end   end   if Touching(enemies[i],player) then    gaming = false   end   end—check game bounds  if player.Position.X.Offset < 0 then   playerVelocity = Vector2.new(0,playerVelocity.y)   player.Position = UDim2.new(0,0,0,player.Position.Y.Offset)  elseif player.Position.X.Offset > 384 then   playerVelocity = Vector2.new(0,playerVelocity.y)   player.Position = UDim2.new(0,384,0,player.Position.Y.Offset)  end   if player.Position.Y.Offset < 0 then   playerVelocity = Vector2.new(playerVelocity.x,0)   player.Position = UDim2.new(0,player.Position.X.Offset,0,0)  end—check player against prize  if prize ~= nil and Touching(player,prize) then   time = time + 100   Tool.Handle.Prize:Play()   prize:remove()   prize = nil   prizeRegenTimer = math.random(180,360)  end  end  function updatePlayerPos()   if math.abs(playerVelocity.x) > 4 then   if playerVelocity.x  < 0 then     playerVelocity = Vector2.new(-4,playerVelocity.y)   else    playerVelocity = Vector2.new(4,playerVelocity.y)   end  end  player.Position = UDim2.new(0,player.Position.X.Offset + playerVelocity.x,0,player.Position.Y.Offset + playerVelocity.y)  playerVelocity = Vector2.new(playerVelocity.x * 0.5,playerVelocity.y * 0.9)  end  function Controls()   if left then   playerVelocity = Vector2.new(playerVelocity.x - 3,playerVelocity.y)  elseif right then   playerVelocity = Vector2.new(playerVelocity.x + 3,playerVelocity.y)  end  if jump and platforming then   jump = false   platforming = false   Tool.Handle.Jump:Play()   playerVelocity = Vector2.new(playerVelocity.x,playerVelocity.y - 20)  end  end  function walkAnimation(forward)   walkCounter = walkCounter + 1  if walkCounter > 8 then   walkCounter = 1  end   local playIndex = walkCounter  if walkCounter == 4 then   playIndex = 2  elseif walkCounter == 5 then   playIndex = 1  elseif walkCounter == 6 then   playIndex = 4  elseif walkCounter == 7 then   playIndex = 5  elseif walkCounter == 8 then   playIndex = 4  end   if forward then   player.Image = "http://www.roblox.com/asset/?id=" .. playerWalkForward[playIndex]  else   player.Image = "http://www.roblox.com/asset/?id=" .. playerWalkBackward[playIndex]  end  end  local forward = true function animation()    if playerVelocity.x > 1 then   forward = true   walkAnimation(forward)  elseif playerVelocity.x < -1 then   forward = false   walkAnimation(forward)  elseif forward then   player.Image = "http://www.roblox.com/asset/?id=" .. playerWalkForward[1]   walkCounter = 1  else   player.Image = "http://www.roblox.com/asset/?id=" .. playerWalkBackward[1]   walkCounter = 1  end  end  local left = true function spawnEnemy()   local enemy = Instance.new("ImageLabel")  enemy.Image = "http://www.roblox.com/asset/?id=32183056"  enemy.Size = UDim2.new(0,16,0,16)  enemy.BackgroundTransparency = 1  enemy.BorderSizePixel = 0  enemy.ZIndex = 2  if left then   enemy.Position = UDim2.new(0,0,0,0)  else   enemy.Position = UDim2.new(0,380,0,0)  end  enemy.Name = "Enemy"  enemy.Parent = gui.Cabinet.Screen.Enemies   local leftDirection = Instance.new("BoolValue")  leftDirection.Name = "Left"  leftDirection.Value = not left  leftDirection.Parent = enemy   left = not left  end  local spawned = false local maxEnemies = 0 function updateEnemies()   maxEnemies = 4 + (time/900)  local enemies = gui.Cabinet.Screen.Enemies:GetChildren()  if #enemies < maxEnemies and not spawned then   spawned = true   spawnEnemy()   local co = coroutine.create(function()    wait(math.random(1,3))    spawned = false   end)   coroutine.resume(co)  end  for i = 1, #enemies do    if enemies[i].Left.Value then    enemies[i].Position = UDim2.new(0,enemies[i].Position.X.Offset - 3,0,enemies[i].Position.Y.Offset)   else    enemies[i].Position = UDim2.new(0,enemies[i].Position.X.Offset + 3,0,enemies[i].Position.Y.Offset)   end   end  end  function updatePrize()  if prizeRegenTimer > 0 then   prizeRegenTimer = prizeRegenTimer - 1   return  end  if prize ==  nil then   prize = Instance.new("ImageLabel")   prize.Name = "Prize"   prize.Size = UDim2.new(0,24,0,24)   prize.Image = "http://www.roblox.com/asset/?id=32190862"   prize.BackgroundTransparency = 1   prize.BorderSizePixel = 0   prize.Parent = gui.Cabinet.Screen    local pos = math.random(1,4)   if pos == 1 then prize.Position = UDim2.new(0,24,0,120)   elseif pos == 2 then prize.Position = UDim2.new(0,350,0,120)   elseif pos == 3 then prize.Position = UDim2.new(0,350,0,230)   else prize.Position = UDim2.new(0,24,0,230) end     end end  function gameOver()   Tool.Handle.Song:Stop()  Tool.Handle.Fail:Play()  wait(1)  if gui:FindFirstChild("Cabinet") then   gui.Cabinet:remove()  end  local scoreFrame = gui:FindFirstChild("ScoreFrame")  if scoreFrame then   scoreFrame.BackgroundTransparency = 0.2  end  while scoreFrame do   gui.ScoreFrame.Position = UDim2.new(0.5,gui.ScoreFrame.Position.X.Offset,0.5,gui.ScoreFrame.Position.Y.Offset - 3)   if gui.ScoreFrame.Position.Y.Offset <= 0 then wait(3) return end   wait()  end  end  function gameLoop()   animTimer = 0  gaming = true  while gaming do   Physics()   Collision()   Controls()   updatePlayerPos()   updateEnemies()   updatePrize()   time = time + 0.05   animTimer = animTimer + 1   if animTimer == 3 then    animation()    animTimer = 0   end   gui.ScoreFrame.Score.Text = tostring(math.floor(time))   wait(0.03)  end  if head.Anchored then   gameOver()  end  end        



Thought that was hard? Oh boy, just wait until you see the GUIs!

Step 4: GameGui and ScoreFrame.

Add a ScreenGui and name it GameGui. Then, add a Frame and call it ScoreFrame. In ScoreFrame, add an ImageLabel (do not change the name) and a TextLabel. Change the TextLabel to Score. For ScoreFrame, here's the changed stats.

  • BackgroundColor3: 51, 102, 255
  • BackgroundTransparency: 1
  • Position: {0.5, -100}, {0.5, 150}
  • Size: {0, 200}, {0, 50}
  • ZIndex: 2

For ImageLabel:

  • BackgroundColor3: 51; 102; 255
  • BackgroundTransparency: 1
  • Image: http://www.roblox.com/asset/?id=31736392
  • Position: {0, 6}, {0, 0}
  • Size: {0, 130}, {0, 50}
  • ZIndex: 2

And for Score:

  • BackgroundColor3: 0; 255; 255
  • BackgroundTransparency: 1
  • BorderSizePixel: 0
  • Position: {0, 130}, {0, 0}
  • Size: {0, 70}, {0, 50}
  • ZIndex: 3

You thought that was hard? Just wait until you add Cabinet and all of its children.

(ADDING THE REST LATER)

Tutorial 4: Making a Sword

This is ColorfulBrendon(Wiki: ColorfulBrendonROBLOX)'s tutorial on how to make your own sword. Maybe someday it will be published as a catalog gear!


Start off spawning a regular brick. Name it "Handle" and resize it to how you want it. Then go to "Workspace" in the window with Explorer and Properties, as these two windows will be required to accomplish your task, and once Workspace is selected, go to "Insert" and select Object. Afterwards you need to select Tool. Name it Sword with Properties and on Explorer, drag your item now named Handle into your item now named Sword. You may Rename sword to whatever you wish, however Handle is important. Now, the game designers of ROBLOX are trying to delete every possible TouchInterest Creator. So, go to Free Models and get a basic build tool of the Administrators' creation. Drag Tool is basic. Open up the "+" in the Drag Tool, select "TouchInterest" click "Copy" and then "Paste" it into the "Handle" of your sword. In Handle insert a SpecialMesh. This is how to make Head appearances, or how to make it so you can make a mesh freely. Copy and paste this into your mesh

rbxasset://fonts/sword.mesh

Now all you have to do is texture it! The BASIC sword mesh is this ID

rbxasset://textures/SwordTexture.png

I will show you what it looks like in a Photo.

Sword texture.png Save this to your computer and edit it with an image editing program. You can see the editor I will make the ENTIRE image white to make a "Lightheart"

Sword texture - Copy.pngfront and back of the handle, the sword's blade, the upper handle, all the detail and designs in the handle, etc.

The "Darkheart" is famous. All it is, would be black. So in my image I am making the entire thing white for, a "Lightheart." Sword texture - Copy.pngYou can't see the image because that, it's white. Now to finish off this section of the sword making process, I must show you how to make your new texture exist.

Upload it to your Decals by doing the following

  1. Go to My ROBLOX
  2. Go to Profile
  3. Go to Stuff
  4. Go to Decals
  5. Click Create
  6. Click Choose File
  7. Select your desired photo
  8. Click Create Decal
  9. Wait for it to be approved. (Wait Time: 1–45 minutes depending on the decal)
  10. If it is not completed within 45 minutes your decal has not been approved.

Now spawn a Brick

On that brick, paste your Decal. Now in Explorer there is now a Decal underneath where it says Part.

In Properties you can see it has an ID. Copy and paste the ID into the TextureID in your sword. Okay so we have a sword looking item that you can pick up but what about the scripts?

Insert a "Script" and "LocalScript" into your Sword (Not the handle)

Let's start with this one:

Script (Rename "Sword Script")

game:service("RunService") local damage = 5 --Edit this to determine your sword's damage when you walk up to a person with it equipped. ~Color local slash_damage = 10—Edit this to determine your sword's damage when you click it at a person. ~Colorlocal lunge_damage = 30—Edit this to determine your sword's damage when you click it enough times to stab with it in the air. ~Color sword = script.Parent.HandleTool = script.Parent local SlashSound = Instance.new("Sound")SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"SlashSound.Parent = swordSlashSound.Volume = .7 local LungeSound = Instance.new("Sound")LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"LungeSound.Parent = swordLungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound")UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"UnsheathSound.Parent = swordUnsheathSound.Volume = 1 function blow(hit)if (hit.Parent == nil) then return end -- happens when bullet hits sword (Don't Edit) local humanoid = hit.Parent:findFirstChild("Humanoid")local vCharacter = Tool.Parentlocal vPlayer = game.Players:playerFromCharacter(vCharacter)local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character (Don't Edit)if humanoid~=nil and humanoid ~= hum and hum ~= nil then—final check, make sure sword is in-hand (Don't Edit) local right_arm = vCharacter:FindFirstChild("Right Arm")if (right_arm ~= nil) thenlocal joint = right_arm:FindFirstChild("RightGrip")if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) thentagHumanoid(humanoid, vPlayer)humanoid:TakeDamage(damage)wait(1)untagHumanoid(humanoid)endend endend function tagHumanoid(humanoid, player)local creator_tag = Instance.new("ObjectValue")creator_tag.Value = playercreator_tag.Name = "creator"creator_tag.Parent = humanoidend function untagHumanoid(humanoid)if humanoid ~= nil thenlocal tag = humanoid:findFirstChild("creator")if tag ~= nil thentag.Parent = nilendendend function attack()damage = slash_damageSlashSound:play()local anim = Instance.new("StringValue")anim.Name = "toolanim"anim.Value = "Slash"anim.Parent = Toolend function lunge()damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue")anim.Name = "toolanim"anim.Value = "Lunge"anim.Parent = Tool force = Instance.new("BodyVelocity")force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 (Don't Edit)force.Parent = Tool.Parent.Torsowait(.25)swordOut()wait(.25)force.Parent = nilwait(.5)swordUp() damage = slash_damageend function swordUp()Tool.GripForward = Vector3.new(-1,0,0)Tool.GripRight = Vector3.new(0,1,0)Tool.GripUp = Vector3.new(0,0,1)end function swordOut()Tool.GripForward = Vector3.new(0,0,1)Tool.GripRight = Vector3.new(0,-1,0)Tool.GripUp = Vector3.new(-1,0,0)end function swordAcross()-- parryend Tool.Enabled = truelocal last_attack = 0function onActivated() if not Tool.Enabled thenreturnend Tool.Enabled = false local character = Tool.Parent;local humanoid = character.Humanoidif humanoid == nil thenprint("Humanoid not found")return end t = r.Stepped:wait() if (t - last_attack < .2) thenlunge()elseattack()end last_attack = t --wait(.5) (Don't Edit) Tool.Enabled = trueend function onEquipped()UnsheathSound:play()end script.Parent.Activated:connect(onActivated)script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow) --ONCE YOU HAVE THIS IN A SCRIPT, ONLY EDIT THE PARTS THAT SAY YOU CAN!

Congratulations, you just made a sword!

How to make Custom Message-Spawning Buttons

By now you should have lots of great gears in your workspace. Want to make a clickable button to make you sound professional to go with it? To make you look just THAT much more impressive? Well, if you do, just read this!

I'm sure some time or another you used or saw someone use In-Game admin, right? h/ or m/? Sorry, there's no l/ that makes a Low text. H isn't high and M isn't middle.

They actually mean Message and Hint. As ReloRelo warned you at the beginning, you probably know this is 5/5 on the Hardness scale meaning you are likely to know how to make one of those models with a hint at the top saying "The Maker of this Map thanks (username) for..." or "Welcome to (place) by (username)" or something like that.

Those are easy to make and I don't want to waste your time with 1/5 on the hardness scale.

Steps:

  1. Spawn a brick
  2. Add a Click Detector
  3. Prepare for the scripts that go in the button!

debounce = false function onClicked()if debounce == false thendebounce = truelocal m = Instance.new("Message")m.Parent = game.Workspacem.Text = "My text here"—Your text goes in the ""s.wait(5) --In five seconds your text vanishesm.Text = "My text here too."—After 5 seconds it switched over to this text.wait(180) --In three minutes your text vanishesm.Text = "Hopefully by now you..."wait(5)m.Text = "...get the pattern?" --I hope you understand it. Not to hard to learn once you have the script.wait (5) --Enjoy! ~Color m:Remove()debounce = false endend script.Parent.ClickDetector.MouseClick:connect(onClicked)

Tutorial 5: Trowel

A84hg here, and this is my first tutorial on how to make a custom trowel. This is on 3. (Medium).

The beginning

First of all, insert a tool, and drag it into the StarterPack. Name it whatever you want. (A84hg's Quality Trowel) for example.

Then, add two scripts into the tool. Name one "BrickCleanup", and name the other "WallMaker".

BrickCleanup

For the BrickCleanup script, add this:

wait(24)

script.Parent.Parent = nil

WallMaker

For the WallMaker script, add this:

local wallHeight = 4

local brickSpeed = 0.04

local wallWidth = 12

local Tool = script.Parent

-- places a brick at pos and returns the position of the brick's opposite corner

function placeBrick(cf, pos, color)

local brick = Instance.new("Part")

brick.BrickColor = color

brick.CFrame = cf * CFrame.new(pos + brick.Size / 2)

script.Parent.BrickCleanup:Clone().Parent = brick—attach cleanup script to this brick

brick.BrickCleanup.Disabled = false

brick.Parent = game.Workspace

brick:MakeJoints()

return brick, pos + brick.Size

end

function buildWall(cf)

local color = BrickColor.random()

local bricks = {}

assert(wallWidth>0)

local y = 0

while y < wallHeight do

local p

local x = -wallWidth/2

while x < wallWidth/2 do

local brick

brick, p = placeBrick(cf, Vector3.new(x, y, 0), color)

x = p.x

table.insert(bricks, brick)

wait(brickSpeed)

end

y = p.y

end

return bricks

end

function snap(v)

if math.abs(v.x)>math.abs(v.z) then

if v.x>0 then

return Vector3.new(1,0,0)

else

return Vector3.new(-1,0,0)

end

else

if v.z>0 then

return Vector3.new(0,0,1)

else

return Vector3.new(0,0,-1)

end

end

end

Tool.Enabled = true

function onActivated()

if not Tool.Enabled then

return

end

Tool.Enabled = false

local character = Tool.Parent;

local humanoid = character.Humanoid

if humanoid == nil then

print("Humanoid not found")

return

end

local targetPos = humanoid.TargetPoint

local lookAt = snap( (targetPos - character.Head.Position).unit )

local cf = CFrame.new(targetPos, targetPos + lookAt)

Tool.Handle.BuildSound:play()

buildWall(cf)

wait(5)

Tool.Enabled = true

end

script.Parent.Activated:connect(onActivated)

Thought that was it? Well, you're wrong! Then, add a LocalScript, insert it into the tool, and name it Local Gui.

Local Gui

Add this in the LS:

local Tool = script.Parent;

enabled = true

function onButton1Down(mouse)

if not enabled then

return

end

enabled = false

mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"

wait(5)

mouse.Icon = "rbxasset://textures\\ArrowCursor.png"

enabled = true

end

function onEquippedLocal(mouse)

if mouse == nil then

print("Mouse not found")

return

end

mouse.Icon = "rbxasset://textures\\ArrowCursor.png"

mouse.Button1Down:connect(function() onButton1Down(mouse) end)

end

Tool.Equipped:connect(onEquippedLocal)

Handle, Sounds, and Mesh

Afterward, insert a brick, and name it Handle.

Insert a sound into the handle, and name it BuildSound. You can give it any sound ID, but bass.wav is recommended. Then, give it a mesh. Give it the Mesh ID rbxasset://fonts/trowel.mesh, and the Texture ID rbxasset://textures/TrowelTexture.png

Test it, and you're done making your very own trowel!

This is A84hg, signing off.

Tutorial 6: Timebomb

Well hello there. I'm A84hg, back with another tutorial for custom gear. This time, we bring you the TIMEBOMB! KABOOM! Difficulty: 3 (Medium)

The beginning

Insert a tool, and drag it into the StarterPack. Name it whatever you like, like A BOMB!

Then insert two scripts. Name one Bomb, and name the other PlantBomb.

Bomb

Put this in Bomb.

local updateInterval = .4

local currentColor = 1

local colors = {26, 21}

local ticksound = Instance.new("Sound")

ticksound.SoundId = "rbxasset://sounds\\clickfast.wav"

ticksound.Parent = script.Parent

function update()

updateInterval = updateInterval * .9

script.Parent.BrickColor = BrickColor.new(colors[currentColor])

currentColor = currentColor + 1

if (currentColor > 2) then currentColor = 1 end

end

function blowUp()

local sound = Instance.new("Sound")

sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"

sound.Parent = script.Parent

sound.Volume = 1

sound:play()

explosion = Instance.new("Explosion")

explosion.BlastRadius = 12

explosion.BlastPressure = 1000000

local creator = script.Parent:findFirstChild("creator")

if creator ~= nil then

explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)

end

explosion.Position = script.Parent.Position

explosion.Parent = game.Workspace

script.Parent.Transparency = 1

end

function onPlayerBlownUp(part, distance, creator)

if part.Name == "Head" then

local humanoid = part.Parent.Humanoid

tagHumanoid(humanoid, creator)

end

end

function tagHumanoid(humanoid, creator)

if creator ~= nil then

local new_tag = creator:clone()

new_tag.Parent = humanoid

end

end

function untagHumanoid(humanoid)

if humanoid ~= nil then

local tag = humanoid:findFirstChild("creator")

if tag ~= nil then

tag.Parent = nil

end

end

end

while updateInterval > .1 do

wait(updateInterval)

update()

ticksound:play()

end

blowUp()

wait(2)

script.Parent:remove()

PlantBomb

Put this in PlantBomb:

local bombScript = script.Parent.Bomb

local Tool = script.Parent

local Bomb = Tool.Handle

function plant()

local bomb2 = Instance.new("Part")

local vCharacter = Tool.Parent

local vPlayer = game.Players:playerFromCharacter(vCharacter)

local spawnPos = Bomb.Position

bomb2.Position = Vector3.new(spawnPos.x, spawnPos.y+3, spawnPos.z)

bomb2.Size = Vector3.new(2,2,2)

bomb2.BrickColor = BrickColor.new(21)

bomb2.Shape = 0

bomb2.BottomSurface = 0

bomb2.TopSurface = 0

bomb2.Reflectance = 1

bomb2.Name = "TimeBomb"

bomb2.Locked = true

local creator_tag = Instance.new("ObjectValue")

creator_tag.Value = vPlayer

creator_tag.Name = "creator"

creator_tag.Parent = bomb2

bomb2.Parent = game.Workspace

local new_script = bombScript:clone()

new_script.Disabled = false

new_script.Parent = bomb2

end

Tool.Enabled = true

function onActivated()

if not Tool.Enabled then

return

end

Tool.Enabled = false

local character = Tool.Parent;

local humanoid = character.Humanoid

if humanoid == nil then

print("Humanoid not found")

return

end

local targetPos = humanoid.TargetPoint

Bomb.Transparency = 1.0

plant()

wait(6)

Bomb.Transparency = 0.0

Tool.Enabled = true

end

function onUnequipped()

end

Tool.Activated:connect(onActivated)

Tool.Unequipped:connect(onUnequipped)

Local Gui

Then, like in the Trowel tutorial, add a LocalScript, and name it Local Gui.

Put this in Local Gui:

local Tool = script.Parent;

local enabled = true

function onButton1Down(mouse)

if not enabled then

return

end

enabled = false

mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"

wait(6)

mouse.Icon = "rbxasset://textures\\ArrowCursor.png"

enabled = true

end

function onEquippedLocal(mouse)

if mouse == nil then

print("Mouse not found")

return

end

mouse.Icon = "rbxasset://textures\\ArrowCursor.png"

mouse.Button1Down:connect(function() onButton1Down(mouse) end)

end

Tool.Equipped:connect(onEquippedLocal)

Then, insert a 2x2x2 brick and name it Handle.

Give it the mesh rbxasset://fonts/timebomb.mesh with the texture rbxasset://textures/bombtex.png

Also, give the handle a TouchTransmitter, and name it TouchInterest.

Test it, and you're done!

This is A84hg, signing off.

How To Create Things In Roblox

Source: https://roblox.fandom.com/wiki/Tutorial:How_to_make_custom_gear

Posted by: fitzgeraldforeas.blogspot.com

0 Response to "How To Create Things In Roblox"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel