Advertisement
Guest User

[Lua] 8xsp's Gear Giver Script 1.2

a guest
Nov 10th, 2019
11,525
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 1
  1. lplr = game.Players.LocalPlayer
  2. lchar = lplr.Character
  3. lhum = lchar:FindFirstChild("Humanoid")
  4. lrootpart = lhum:FindFirstChild("HumanoidRootPart")
  5. torso = lchar:FindFirstChild("Torso")
  6. animator = lhum.Animator
  7. backpack = lplr.Backpack
  8. ls = torso:FindFirstChild("Left Shoulder")
  9. ra = lchar:FindFirstChild("Right Arm")
  10. lh = torso:FindFirstChild("Left Hip")
  11. la = lchar:FindFirstChild("Left Arm")
  12. rs = torso:FindFirstChild("Right Shoulder")
  13. rh = torso:FindFirstChild("Right Hip")
  14. rl = lchar:FindFirstChild("Right Leg")
  15. ll = lchar:FindFirstChild("Left Leg")
  16. neck = torso:FindFirstChild("Neck")
  17. v3 = Vector3.new
  18. cf = CFrame
  19. create = Instance.new
  20. pixelsizepreferred = 2.75
  21. pgui = lplr.PlayerGui
  22. --Making the gui
  23. screenGUI = create("ScreenGui", pgui)
  24. --Making the textbox
  25. local generalframe = create("Frame")
  26. generalframe.Size = UDim2.new(0, 250, 0, 110)
  27. generalframe.Position = UDim2.new(0.5, 0, 0.5, 0)
  28. generalframe.Active = true
  29. generalframe.Draggable = true
  30. generalframe.BackgroundColor3 = BrickColor.new("Really black").Color
  31. generalframe.BorderSizePixel = 5
  32. generalframe.Transparency = 0.1
  33. generalframe.Parent = screenGUI
  34. local textbox = create("TextBox", generalframe)
  35. textbox.Position = UDim2.new(0.5/5, 0, 0.375, 0)
  36. textbox.Size = UDim2.new(0, 200, 0, 25)
  37. textbox.BackgroundColor3 = BrickColor.new("Really black").Color
  38. textbox.Text = "Insert ID Here"
  39. textbox.TextColor = BrickColor.new("Institutional white")
  40. textbox.Font = "SciFi"
  41. textbox.FontSize = "Size24"
  42. textbox.BorderSizePixel = pixelsizepreferred
  43. --Making give gear button
  44. local execbutton = create("TextButton", generalframe)
  45. execbutton.Position = textbox.Position + UDim2.new(0, 0, 0, 32.5)
  46. execbutton.Size = UDim2.new(0, 95, 0, 20)
  47. execbutton.Text = "Insert"
  48. execbutton.BackgroundColor3 = BrickColor.new("Really black").Color
  49. execbutton.TextColor = BrickColor.new("Institutional white")
  50. execbutton.Font = "SciFi"
  51. execbutton.FontSize = Enum.FontSize.Size18
  52. execbutton.BorderSizePixel = pixelsizepreferred
  53. --Making clear inventory button
  54. local clearbutton = create("TextButton", generalframe)
  55. clearbutton.Position = execbutton.Position + UDim2.new(0, 105, 0, 0)
  56. clearbutton.Size = UDim2.new(0, 95, 0, 20)
  57. clearbutton.Text = "Clear"
  58. clearbutton.BackgroundColor3 = BrickColor.new("Really black").Color
  59. clearbutton.TextColor = BrickColor.new(255, 255, 255)
  60. clearbutton.Font = "SciFi"
  61. clearbutton.FontSize = Enum.FontSize.Size18
  62. clearbutton.BorderSizePixel = pixelsizepreferred
  63. --Making credits text
  64. local credits = Instance.new("TextLabel")
  65. credits.Parent = generalframe
  66. credits.Position = textbox.Position - UDim2.new(0, 0, 0, 30)
  67. credits.Size = UDim2.new(0, 200, 0, 25)
  68. credits.BackgroundColor3 = BrickColor.new("Really black").Color
  69. credits.Text = "Programmed by 8xsp"
  70. credits.Font = "SciFi"
  71. credits.FontSize = "Size18"
  72. credits.TextColor = BrickColor.new(255, 255, 255)
  73. credits.BorderSizePixel = pixelsizepreferred
  74. function givegear()
  75. local gearid = textbox.Text
  76. local InsertService = game:GetService('InsertService')
  77. local gearmodel = InsertService:LoadAsset(gearid)
  78. vgear = gearmodel:GetChildren()[1]
  79. vgear.Parent = backpack
  80. end
  81. execbutton.MouseButton1Down:connect(function()
  82. givegear()
  83. if vgear:IsA("Hat") then
  84. vgear.Parent = lchar
  85. end
  86. end)
  87. clearbutton.MouseButton1Down:connect(function()
  88. for i, v in pairs (backpack:GetChildren()) do
  89. if v:IsA("Tool") then
  90. v:Remove()
  91. end
  92. end
  93. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement