SHARE
TWEET

Roblox Studio: How to Make a Tool GUI

RobloxStudio_Script Oct 21st, 2019 161 in 340 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Subscribe Roblox Studio
  2. Tool = script.Parent
  3.  
  4. function onEquippedLocal()
  5.  local character = script.Parent.Parent
  6.  local player = game.Players:GetPlayerFromCharacter(character)
  7. if player==nil then return end
  8.  guiMain = script.Parent.ScreenGui:clone()
  9.  guiMain.Parent = player.PlayerGui
  10. end
  11.  
  12.  
  13. function onUneqippedLocal()
  14.  guiMain:Remove()
  15. end
  16.  
  17.  
  18. Tool.Equipped:connect(onEquippedLocal)
  19. Tool.Unequipped:connect(onUneqippedLocal)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top