Advertisement
Guest User

Untitled

a guest
May 26th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. script.Parent.Parent:WaitForChild("ITEM")
  2. game.Players.LocalPlayer.Character:WaitForChild("Head")
  3. game.Players.LocalPlayer.Character.Head:WaitForChild("Splash")
  4. game.Players.LocalPlayer.PlayerGui.USERINTERFACE.HUD.Hunger:WaitForChild("Hunger")
  5. game.Players.LocalPlayer.PlayerGui.USERINTERFACE.HUD.Thirst:WaitForChild("Thirst")
  6.  
  7. local user = game.Players.LocalPlayer
  8. local stats = user:findFirstChild("leaderstats")
  9. local VERUS = stats:findFirstChild("VERUS")
  10. local INVFRAME = script.Parent.Parent
  11. local INVBUTTON = script.Parent
  12. local UI = game.Players.LocalPlayer.PlayerGui.USERINTERFACE
  13. local SOUND = game.Players.LocalPlayer.Character.Head.Splash
  14.  
  15. function Use()
  16. if INVFRAME.ITEM.Value == true then
  17. local OBJ = INVFRAME.Object
  18.  
  19. if OBJ["4 Type"].Value == "Drink" then -- DRINK TYPE
  20. INVFRAME.ITEM.Value = false
  21. SOUND.SoundId = "rbxassetid://1377387911"
  22. SOUND:Play()
  23. script.Parent.Parent.Parent.Parent.Parent.HUD.Thirst.Thirst.Value = script.Parent.Parent.Parent.Parent.Parent.HUD.Thirst.Thirst.Value + OBJ["Value"].Value
  24. UI.HUD.Thirst.Text = "THIRST:" ..UI.HUD.Thirst.Thirst.Value.. "%"
  25. INVFRAME.SPC.Text = ""
  26. INVFRAME.ITMNME.Text = "Empty Slot"
  27. INVFRAME.ITEMPIC.Image =""
  28. OBJ:Remove()
  29.  
  30. else if OBJ["4 Type"].Value == "Food" then -- FOOD TYPE
  31. INVFRAME.ITEM.Value = false
  32. SOUND.SoundId = "rbxassetid://181027147"
  33. SOUND:Play()
  34. script.Parent.Parent.Parent.Parent.Parent.HUD.Hunger.Hunger.Value = script.Parent.Parent.Parent.Parent.Parent.HUD.Hunger.Hunger.Value + OBJ["Value"].Value
  35. UI.HUD.Hunger.Text = "HUNGER:" ..UI.HUD.Hunger.Hunger.Value.. "%"
  36. INVFRAME.SPC.Text = ""
  37. INVFRAME.ITMNME.Text = "Empty Slot"
  38. INVFRAME.ITEMPIC.Image =""
  39. OBJ:Remove()
  40.  
  41. else if OBJ["4 Type"].Value == "Garment" then -- GARMENT TYPE
  42. INVFRAME.ITEM.Value = false
  43. SOUND.SoundId = "rbxassetid://849823851"
  44. SOUND:Play()
  45. game.Players.LocalPlayer.Character.Shirt.ShirtTemplate = OBJ.Shirt.Value
  46. game.Players.LocalPlayer.Character.Pants.PantsTemplate = OBJ.Pants.Value
  47. INVFRAME.SPC.Text = ""
  48. INVFRAME.ITMNME.Text = "Empty Slot"
  49. INVFRAME.ITEMPIC.Image =""
  50. OBJ:Remove()
  51.  
  52.  
  53. else if OBJ["4 Type"].Value == "Equipable" then -- EQUIPABLE TYPE
  54. INVFRAME.ITEM.Value = false
  55. SOUND.SoundId = "rbxassetid://849823851"
  56. SOUND:Play()
  57. local Equip = game.ServerStorage.ITEMS[OBJ["1 Item"].Value]:clone()
  58. Equip.Parent = game.Players.LocalPlayer.Backpack
  59. INVFRAME.SPC.Text = ""
  60. INVFRAME.ITMNME.Text = "Empty Slot"
  61. INVFRAME.ITEMPIC.Image =""
  62. OBJ:Remove()
  63.  
  64. else if OBJ["4 Type"].Value == "Currency" then -- CURRENCY TYPE
  65. INVFRAME.ITEM.Value = false
  66. SOUND.SoundId = "rbxassetid://1374927480"
  67. SOUND:Play()
  68. VERUS.Value = VERUS.Value + OBJ["Value"].Value
  69. INVFRAME.SPC.Text = ""
  70. INVFRAME.ITMNME.Text = "Empty Slot"
  71. INVFRAME.ITEMPIC.Image =""
  72. OBJ:Remove()
  73.  
  74. else if OBJ["4 Type"].Value == "Health" then -- CURRENCY TYPE
  75. INVFRAME.ITEM.Value = false
  76. SOUND.SoundId = "rbxassetid://334463812"
  77. SOUND:Play()
  78. user.Character.Humanoid.Health = user.Character.Humanoid.Health + OBJ["Value"].Value
  79. INVFRAME.SPC.Text = ""
  80. INVFRAME.ITMNME.Text = "Empty Slot"
  81. INVFRAME.ITEMPIC.Image =""
  82. OBJ:Remove()
  83. end
  84. end
  85. end
  86. end
  87. end
  88. end
  89. end
  90. end
  91.  
  92. function Drop()
  93. local OBJ = INVFRAME.Object
  94. if INVFRAME.ITEM.Value == true then
  95. if OBJ.DROPABLE.Value == true then
  96. INVFRAME.ITEM.Value = false
  97. SOUND.SoundId = "rbxassetid://648479338"
  98. SOUND:Play()
  99. INVFRAME.SPC.Text = ""
  100. INVFRAME.ITMNME.Text = "Empty Slot"
  101. INVFRAME.ITEMPIC.Image =""
  102. local OBJ = INVFRAME.Object
  103. OBJ.Parent = game.Workspace
  104. OBJ.Anchored = false
  105. OBJ.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  106. end
  107. end
  108. end
  109.  
  110. INVBUTTON.MouseButton1Down:connect(function()
  111. Use()
  112. end)
  113.  
  114. INVBUTTON.MouseButton2Down:connect(function()
  115. Drop()
  116. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement