Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.Parent:WaitForChild("ITEM")
- game.Players.LocalPlayer.Character:WaitForChild("Head")
- game.Players.LocalPlayer.Character.Head:WaitForChild("Splash")
- game.Players.LocalPlayer.PlayerGui.USERINTERFACE.HUD.Hunger:WaitForChild("Hunger")
- game.Players.LocalPlayer.PlayerGui.USERINTERFACE.HUD.Thirst:WaitForChild("Thirst")
- local user = game.Players.LocalPlayer
- local stats = user:findFirstChild("leaderstats")
- local VERUS = stats:findFirstChild("VERUS")
- local INVFRAME = script.Parent.Parent
- local INVBUTTON = script.Parent
- local UI = game.Players.LocalPlayer.PlayerGui.USERINTERFACE
- local SOUND = game.Players.LocalPlayer.Character.Head.Splash
- function Use()
- if INVFRAME.ITEM.Value == true then
- local OBJ = INVFRAME.Object
- if OBJ["4 Type"].Value == "Drink" then -- DRINK TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://1377387911"
- SOUND:Play()
- script.Parent.Parent.Parent.Parent.Parent.HUD.Thirst.Thirst.Value = script.Parent.Parent.Parent.Parent.Parent.HUD.Thirst.Thirst.Value + OBJ["Value"].Value
- UI.HUD.Thirst.Text = "THIRST:" ..UI.HUD.Thirst.Thirst.Value.. "%"
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- else if OBJ["4 Type"].Value == "Food" then -- FOOD TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://181027147"
- SOUND:Play()
- script.Parent.Parent.Parent.Parent.Parent.HUD.Hunger.Hunger.Value = script.Parent.Parent.Parent.Parent.Parent.HUD.Hunger.Hunger.Value + OBJ["Value"].Value
- UI.HUD.Hunger.Text = "HUNGER:" ..UI.HUD.Hunger.Hunger.Value.. "%"
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- else if OBJ["4 Type"].Value == "Garment" then -- GARMENT TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://849823851"
- SOUND:Play()
- game.Players.LocalPlayer.Character.Shirt.ShirtTemplate = OBJ.Shirt.Value
- game.Players.LocalPlayer.Character.Pants.PantsTemplate = OBJ.Pants.Value
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- else if OBJ["4 Type"].Value == "Equipable" then -- EQUIPABLE TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://849823851"
- SOUND:Play()
- local Equip = game.ServerStorage.ITEMS[OBJ["1 Item"].Value]:clone()
- Equip.Parent = game.Players.LocalPlayer.Backpack
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- else if OBJ["4 Type"].Value == "Currency" then -- CURRENCY TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://1374927480"
- SOUND:Play()
- VERUS.Value = VERUS.Value + OBJ["Value"].Value
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- else if OBJ["4 Type"].Value == "Health" then -- CURRENCY TYPE
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://334463812"
- SOUND:Play()
- user.Character.Humanoid.Health = user.Character.Humanoid.Health + OBJ["Value"].Value
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- OBJ:Remove()
- end
- end
- end
- end
- end
- end
- end
- end
- function Drop()
- local OBJ = INVFRAME.Object
- if INVFRAME.ITEM.Value == true then
- if OBJ.DROPABLE.Value == true then
- INVFRAME.ITEM.Value = false
- SOUND.SoundId = "rbxassetid://648479338"
- SOUND:Play()
- INVFRAME.SPC.Text = ""
- INVFRAME.ITMNME.Text = "Empty Slot"
- INVFRAME.ITEMPIC.Image =""
- local OBJ = INVFRAME.Object
- OBJ.Parent = game.Workspace
- OBJ.Anchored = false
- OBJ.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- end
- end
- end
- INVBUTTON.MouseButton1Down:connect(function()
- Use()
- end)
- INVBUTTON.MouseButton2Down:connect(function()
- Drop()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement