Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local debounce = true
- local dataStore = game:GetService("DataStoreService"):GetDataStore("RealAccessories")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local itemsFolder = game.ReplicatedStorage.Accessories:WaitForChild("Events")
- local Goblet = game.ReplicatedStorage.Accessories:FindFirstChild("Goblet")
- local ChocolateMilk = game.ReplicatedStorage.Accessories:FindFirstChild("ChocolateMilk")
- local StarBloxCoffee = game.ReplicatedStorage.Accessories:FindFirstChild("StarBloxCoffee")
- local HotDog = game.ReplicatedStorage.Accessories:FindFirstChild("HotDog")
- local TeddyBloxpin = game.ReplicatedStorage.Accessories:FindFirstChild("TeddyBloxpin")
- local PirateJuice = game.ReplicatedStorage.Accessories:FindFirstChild("PirateJuice")
- local Taco = game.ReplicatedStorage.Accessories:FindFirstChild("Taco")
- local Watermelon = game.ReplicatedStorage.Accessories:FindFirstChild("Watermelon")
- local Pizza = game.ReplicatedStorage.Accessories:FindFirstChild("Pizza")
- local FoamFinger = game.ReplicatedStorage.Accessories:FindFirstChild("FoamFinger")
- local Compass = game.ReplicatedStorage.Accessories:FindFirstChild("Compass")
- local TomsBeans = game.ReplicatedStorage.Accessories:FindFirstChild("TomsBeans")
- local IceCream = game.ReplicatedStorage.Accessories:FindFirstChild("IceCream")
- local Waffle = game.ReplicatedStorage.Accessories:FindFirstChild("Waffle")
- local WitchesBrew = game.ReplicatedStorage.Accessories:FindFirstChild("WitchesBrew")
- local Torch = game.ReplicatedStorage.Accessories:FindFirstChild("Torch")
- local BloxxyRadar = game.ReplicatedStorage.Accessories:FindFirstChild("BloxxyRadar")
- local SpaceSandwitch = game.ReplicatedStorage.Accessories:FindFirstChild("SpaceSandwitch")
- local Cake = game.ReplicatedStorage.Accessories:FindFirstChild("Cake")
- local FaceoffPotion = game.ReplicatedStorage.Accessories:FindFirstChild("FaceOffPotion")
- local Bubblegum = game.ReplicatedStorage.Accessories:FindFirstChild("BubbleGum")
- local Monkey = game.ReplicatedStorage.Accessories:FindFirstChild("Monkey")
- local NoiseMaker = game.ReplicatedStorage.Accessories:FindFirstChild("NoiseMaker")
- local ApplePie = game.ReplicatedStorage.Accessories:FindFirstChild("ApplePie")
- local PandaFriend = game.ReplicatedStorage.Accessories:FindFirstChild("PandaFriend")
- local BangGun = game.ReplicatedStorage.Accessories:FindFirstChild("BangGun")
- local WhopeeCushion = game.ReplicatedStorage.Accessories:FindFirstChild("WhopeeCushion")
- local WoodenSword = game.ReplicatedStorage.Accessories:FindFirstChild("WoodenSword")
- local Dragon = game.ReplicatedStorage.Accessories:FindFirstChild("Dragon")
- local WoodenStaff = game.ReplicatedStorage.Accessories:FindFirstChild("WoodenStaff")
- local Spray = game.ReplicatedStorage.Accessories:FindFirstChild("Spray")
- local ClownBomb = game.ReplicatedStorage.Accessories:FindFirstChild("ClownBomb")
- local ChameleonPotion = game.ReplicatedStorage.Accessories:FindFirstChild("ChameleonPotion")
- local SpyDrone = game.ReplicatedStorage.Accessories:FindFirstChild("SpyDrone")
- local Moneybag = game.ReplicatedStorage.Accessories:FindFirstChild("Moneybag") -- 18
- -- Functions
- game.Players.PlayerAdded:Connect(function(player)
- -- Stats for the player
- local AccessoriesInventory = Instance.new("Folder",player); AccessoriesInventory.Name = "AccessoriesInventory"
- local EquippedAccessories = Instance.new("Folder",AccessoriesInventory); EquippedAccessories.Name = "EquippedAccessories"
- local GobletAccessory = Instance.new("StringValue",EquippedAccessories); GobletAccessory.Name = "EquippedGoblet"
- local Gobletbool = Instance.new("BoolValue",player.AccessoriesInventory); Gobletbool.Name = "Goblet"
- local ChocolateMilkAccessory = Instance.new("StringValue",EquippedAccessories); ChocolateMilkAccessory.Name = "EquippedChocolateMilk"
- local ChocolateMilkbool = Instance.new("BoolValue",player.AccessoriesInventory); ChocolateMilkbool.Name = "ChocolateMilk"
- local StarBloxCoffeeAccessory = Instance.new("StringValue",EquippedAccessories); StarBloxCoffeeAccessory.Name = "EquippedStarBloxCoffee"
- local StarBloxCoffeebool = Instance.new("BoolValue",player.AccessoriesInventory); StarBloxCoffeebool.Name = "StarBloxCoffee"
- local HotdogAccessory = Instance.new("StringValue",EquippedAccessories); HotdogAccessory.Name = "EquippedHotdog"
- local Hotdogbool = Instance.new("BoolValue",player.AccessoriesInventory); Hotdogbool.Name = "Hotdog"
- local TeddyBloxpinAccessory = Instance.new("StringValue",EquippedAccessories); TeddyBloxpinAccessory.Name = "EquippedTeddyBloxpin"
- local TeddyBloxpinbool = Instance.new("BoolValue",player.AccessoriesInventory); TeddyBloxpinbool.Name = "TeddyBloxpin"
- local PirateJuiceAccessory = Instance.new("StringValue",EquippedAccessories); PirateJuiceAccessory.Name = "EquippedPirateJuice"
- local PirateJuicebool = Instance.new("BoolValue",player.AccessoriesInventory); PirateJuicebool.Name = "PirateJuice"
- local TacoAccessory = Instance.new("StringValue",EquippedAccessories); TacoAccessory.Name = "EquippedTaco"
- local Tacobool = Instance.new("BoolValue",player.AccessoriesInventory); Tacobool.Name = "Taco"
- local WatermelonAccessory = Instance.new("StringValue",EquippedAccessories); WatermelonAccessory.Name = "EquippedWatermelon"
- local Watermelonbool = Instance.new("BoolValue",player.AccessoriesInventory); Watermelonbool.Name = "Watermelon"
- local PizzaAccessory = Instance.new("StringValue",EquippedAccessories); PizzaAccessory.Name = "EquippedPizza"
- local Pizzabool = Instance.new("BoolValue",player.AccessoriesInventory); Pizzabool.Name = "Pizza"
- local FoamFingerAccessory = Instance.new("StringValue",EquippedAccessories); FoamFingerAccessory.Name = "EquippedFoamFinger"
- local FoamFingerbool = Instance.new("BoolValue",player.AccessoriesInventory); FoamFingerbool.Name = "FoamFinger"
- local CompassAccessory = Instance.new("StringValue",EquippedAccessories); CompassAccessory.Name = "EquippedCompass"
- local Compassbool = Instance.new("BoolValue",player.AccessoriesInventory); Compassbool.Name = "Compass"
- local TomsBeansAccessory = Instance.new("StringValue",EquippedAccessories); TomsBeansAccessory.Name = "EquippedTomsBeans"
- local TomsBeansbool = Instance.new("BoolValue",player.AccessoriesInventory); TomsBeansbool.Name = "TomsBeans"
- local IceCreamAccessory = Instance.new("StringValue",EquippedAccessories); IceCreamAccessory.Name = "EquippedIceCream"
- local IceCreambool = Instance.new("BoolValue",player.AccessoriesInventory); IceCreambool.Name = "IceCream"
- local WaffleAccessory = Instance.new("StringValue",EquippedAccessories); WaffleAccessory.Name = "EquippedWaffle"
- local Wafflebool = Instance.new("BoolValue",player.AccessoriesInventory); Wafflebool.Name = "Waffle"
- local WitchesBrewAccessory = Instance.new("StringValue",EquippedAccessories); WitchesBrewAccessory.Name = "EquippedWitchesBrew"
- local WitchesBrewbool = Instance.new("BoolValue",player.AccessoriesInventory); WitchesBrewbool.Name = "WitchesBrew"
- local TorchAccessory = Instance.new("StringValue",EquippedAccessories); TorchAccessory.Name = "EquippedTorch"
- local Torchbool = Instance.new("BoolValue",player.AccessoriesInventory); Torchbool.Name = "Torch"
- local BloxxyRadarAccessory = Instance.new("StringValue",EquippedAccessories); BloxxyRadarAccessory.Name = "EquippedBloxxyRadar"
- local BloxxyRadarbool = Instance.new("BoolValue",player.AccessoriesInventory); BloxxyRadarbool.Name = "BloxxyRadar"
- local SpaceSandwitchAccessory = Instance.new("StringValue",EquippedAccessories); SpaceSandwitchAccessory.Name = "EquippedSpaceSandwitch"
- local SpaceSandwitchbool = Instance.new("BoolValue",player.AccessoriesInventory); SpaceSandwitchbool.Name = "SpaceSandwitch"
- local CakeAccessory = Instance.new("StringValue",EquippedAccessories); CakeAccessory.Name = "EquippedCake"
- local Cakebool = Instance.new("BoolValue",player.AccessoriesInventory); Cakebool.Name = "Cake"
- local FaceoffPotionAccessory = Instance.new("StringValue",EquippedAccessories); FaceoffPotionAccessory.Name = "EquippedFaceoffPotion"
- local FaceoffPotionbool = Instance.new("BoolValue",player.AccessoriesInventory); FaceoffPotionbool.Name = "FaceoffPotion"
- local BubblegumAccessory = Instance.new("StringValue",EquippedAccessories); BubblegumAccessory.Name = "EquippedBubblegum"
- local Bubblegumbool = Instance.new("BoolValue",player.AccessoriesInventory); Bubblegumbool.Name = "Bubblegum"
- local MonkeyAccessory = Instance.new("StringValue",EquippedAccessories); MonkeyAccessory.Name = "EquippedMonkey"
- local Monkeybool = Instance.new("BoolValue",player.AccessoriesInventory); Monkeybool.Name = "Monkey"
- local NoiseMakerAccessory = Instance.new("StringValue",EquippedAccessories); NoiseMakerAccessory.Name = "EquippedNoiseMaker"
- local NoiseMakerbool = Instance.new("BoolValue",player.AccessoriesInventory); NoiseMakerbool.Name = "NoiseMaker"
- local ApplePieAccessory = Instance.new("StringValue",EquippedAccessories); ApplePieAccessory.Name = "EquippedApplePie"
- local ApplePiebool = Instance.new("BoolValue",player.AccessoriesInventory); ApplePiebool.Name = "ApplePie"
- local PandaFriendAccessory = Instance.new("StringValue",EquippedAccessories); PandaFriendAccessory.Name = "EquippedPandaFriend"
- local PandaFriendbool = Instance.new("BoolValue",player.AccessoriesInventory); PandaFriendbool.Name = "PandaFriend"
- local BangGunAccessory = Instance.new("StringValue",EquippedAccessories); BangGunAccessory.Name = "EquippedBangGun"
- local BangGunbool = Instance.new("BoolValue",player.AccessoriesInventory); BangGunbool.Name = "BangGun"
- local WhopeeCushionAccessory = Instance.new("StringValue",EquippedAccessories); WhopeeCushionAccessory.Name = "EquippedWhopeeCushion"
- local WhopeeCushionbool = Instance.new("BoolValue",player.AccessoriesInventory); WhopeeCushionbool.Name = "WhopeeCushion"
- local WoodenSwordAccessory = Instance.new("StringValue",EquippedAccessories); WoodenSwordAccessory.Name = "EquippedWoodenSword"
- local WoodenSwordbool = Instance.new("BoolValue",player.AccessoriesInventory); WoodenSwordbool.Name = "WoodenSword"
- local DragonAccessory = Instance.new("StringValue",EquippedAccessories); DragonAccessory.Name = "EquippedDragon"
- local Dragonbool = Instance.new("BoolValue",player.AccessoriesInventory); Dragonbool.Name = "Dragon"
- local WoodenStaffAccessory = Instance.new("StringValue",EquippedAccessories); WoodenStaffAccessory.Name = "EquippedWoodenStaff"
- local WoodenStaffbool = Instance.new("BoolValue",player.AccessoriesInventory); WoodenStaffbool.Name = "WoodenStaff"
- local SprayAccessory = Instance.new("StringValue",EquippedAccessories); SprayAccessory.Name = "EquippedSpray"
- local Spraybool = Instance.new("BoolValue",player.AccessoriesInventory); Spraybool.Name = "Spray"
- local ClownBombAccessory = Instance.new("StringValue",EquippedAccessories); ClownBombAccessory.Name = "EquippedClownBomb"
- local ClownBombbool = Instance.new("BoolValue",player.AccessoriesInventory); ClownBombbool.Name = "ClownBomb"
- local ChameleonPotionAccessory = Instance.new("StringValue",EquippedAccessories); ChameleonPotionAccessory.Name = "EquippedChameleonPotion"
- local ChameleonPotionbool = Instance.new("BoolValue",player.AccessoriesInventory); ChameleonPotionbool.Name = "ChameleonPotion"
- local SpyDroneAccessory = Instance.new("StringValue",EquippedAccessories); SpyDroneAccessory.Name = "EquippedSpyDrone"
- local SpyDronebool = Instance.new("BoolValue",player.AccessoriesInventory); SpyDronebool.Name = "SpyDrone"
- local MoneybagAccessory = Instance.new("StringValue",EquippedAccessories); MoneybagAccessory.Name = "EquippedMoneybag"
- local Moneybagbool = Instance.new("BoolValue",player.AccessoriesInventory); Moneybagbool.Name = "Moneybag"
- local PlayerUserId = "Player_"..player.UserId
- --Load Data
- local data
- local success, errormessage = pcall(function()
- data = dataStore:GetAsync(PlayerUserId)
- end)
- if success then
- if data then
- Gobletbool.Value = data.Gobletbool
- GobletAccessory.Value = data.GobletAccessory
- ChocolateMilkbool.Value = data.ChocolateMilkbool
- ChocolateMilkAccessory.Value = data.ChocolateMilkAccessory
- StarBloxCoffeebool.Value = data.StarBloxCoffeebool
- StarBloxCoffeeAccessory.Value = data.StarBloxCoffeeAccessory
- Hotdogbool.Value = data.Hotdogbool
- HotdogAccessory.Value = data.HotdogAccessory
- TeddyBloxpinbool.Value = data.TeddyBloxpinbool
- TeddyBloxpinAccessory.Value = data.TeddyBloxpinAccessory
- PirateJuicebool.Value = data.PirateJuicebool
- PirateJuiceAccessory.Value = data.PirateJuiceAccessory
- Tacobool.Value = data.Tacobool
- TacoAccessory.Value = data.TacoAccessory
- Watermelonbool.Value = data.Watermelonbool
- WatermelonAccessory.Value = data.WatermelonAccessory
- Pizzabool.Value = data.Pizzabool
- PizzaAccessory.Value = data.PizzaAccessory
- FoamFingerbool.Value = data.FoamFingerbool
- FoamFingerAccessory.Value = data.FoamFingerAccessory
- Compassbool.Value = data.Compassbool
- CompassAccessory.Value = data.CompassAccessory
- TomsBeansbool.Value = data.TomsBeansbool
- TomsBeansAccessory.Value = data.TomsBeansAccessory
- IceCreambool.Value = data.IceCreambool
- IceCreamAccessory.Value = data.IceCreamAccessory
- Wafflebool.Value = data.Wafflebool
- WaffleAccessory.Value = data.WaffleAccessory
- WitchesBrewbool.Value = data.WitchesBrewbool
- WitchesBrewAccessory.Value = data.WitchesBrewAccessory
- Torchbool.Value = data.Torchbool
- TorchAccessory.Value = data.TorchAccessory
- BloxxyRadarbool.Value = data.BloxxyRadarbool
- BloxxyRadarAccessory.Value = data.BloxxyRadarAccessory
- SpaceSandwitchbool.Value = data.SpaceSandwitchbool
- SpaceSandwitchAccessory.Value = data.SpaceSandwitchAccessory
- Cakebool.Value = data.Cakebool
- CakeAccessory.Value = data.CakeAccessory
- FaceoffPotionbool.Value = data.FaceoffPotionbool
- FaceoffPotionAccessory.Value = data.FaceoffPotionAccessory
- Bubblegumbool.Value = data.Bubblegumbool
- BubblegumAccessory.Value = data.BubblegumAccessory
- Monkeybool.Value = data.Monkeybool
- MonkeyAccessory.Value = data.MonkeyAccessory
- NoiseMakerbool.Value = data.NoiseMakerbool
- NoiseMakerAccessory.Value = data.NoiseMakerAccessory
- ApplePiebool.Value = data.ApplePiebool
- ApplePieAccessory.Value = data.ApplePieAccessory
- PandaFriendbool.Value = data.PandaFriendbool
- PandaFriendAccessory.Value = data.PandaFriendAccessory
- BangGunbool.Value = data.BangGunbool
- BangGunAccessory.Value = data.BangGunAccessory
- WhopeeCushionbool.Value = data.WhopeeCushionbool
- WhopeeCushionAccessory.Value = data.WhopeeCushionAccessory
- WoodenSwordbool.Value = data.WoodenSwordbool
- WoodenSwordAccessory.Value = data.WoodenSwordAccessory
- Dragonbool.Value = data.Spraybool
- DragonAccessory.Value = data.SprayAccessory
- WoodenStaffbool.Value = data.WoodenStaffbool
- WoodenStaffAccessory.Value = data.WoodenStaffAccessory
- Spraybool.Value = data.Spraybool
- SprayAccessory.Value = data.SprayAccessory
- ClownBombbool.Value = data.ClownBombbool
- ClownBombAccessory.Value = data.ClownBombAccessory
- ChameleonPotionbool.Value = data.ChameleonPotionbool
- ChameleonPotionAccessory.Value = data.ChameleonPotionAccessory
- SpyDronebool.Value = data.SpyDronebool
- SpyDroneAccessory.Value = data.SpyDroneAccessory
- Moneybagbool.Value = data.Moneybagbool
- MoneybagAccessory.Value = data.MoneybagAccessory
- end
- end
- -- This event will fire the client to update the gui
- game.ReplicatedStorage.Accessories.Events.SendData:FireClient(player,data)
- end)
- game.Players.PlayerRemoving:Connect(function(player)
- local PlayerUserId = "Player_"..player.UserId
- local data = {
- Gobletbool = player.AccessoriesInventory.Goblet.Value;
- GobletAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedGoblet.Value;
- ChocolateMilkbool = player.AccessoriesInventory.ChocolateMilk.Value;
- ChocolateMilkAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedChocolateMilk.Value;
- StarBloxCoffeebool = player.AccessoriesInventory.StarBloxCoffee.Value;
- StarBloxCoffeeAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedStarBloxCoffee.Value;
- Hotdogbool = player.AccessoriesInventory.Hotdog.Value;
- HotdogAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedHotdog.Value;
- TeddyBloxpinbool = player.AccessoriesInventory.TeddyBloxpin.Value;
- TeddyBloxpinAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedTeddyBloxpin.Value;
- PirateJuicebool = player.AccessoriesInventory.PirateJuice.Value;
- PirateJuiceAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedPirateJuice.Value;
- Tacobool = player.AccessoriesInventory.Taco.Value;
- TacoAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedTaco.Value;
- Watermelonbool = player.AccessoriesInventory.Watermelon.Value;
- WatermelonAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWatermelon.Value;
- Pizzabool = player.AccessoriesInventory.Pizza.Value;
- PizzaAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedPizza.Value;
- FoamFingerbool = player.AccessoriesInventory.FoamFinger.Value;
- FoamFingerAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedFoamFinger.Value;
- Compassbool = player.AccessoriesInventory.Compass.Value;
- CompassAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedCompass.Value;
- TomsBeansbool = player.AccessoriesInventory.TomsBeans.Value;
- TomsBeansAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedTomsBeans.Value;
- IceCreambool = player.AccessoriesInventory.IceCream.Value;
- IceCreamAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedIceCream.Value;
- Wafflebool = player.AccessoriesInventory.Waffle.Value;
- WaffleAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWaffle.Value;
- WitchesBrewbool = player.AccessoriesInventory.WitchesBrew.Value;
- WitchesBrewAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWitchesBrew.Value;
- Torchbool = player.AccessoriesInventory.Torch.Value;
- TorchAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedTorch.Value;
- BloxxyRadarbool = player.AccessoriesInventory.BloxxyRadar.Value;
- BloxxyRadarAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedBloxxyRadar.Value;
- SpaceSandwitchbool = player.AccessoriesInventory.SpaceSandwitch.Value;
- SpaceSandwitchAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedSpaceSandwitch.Value;
- Cakebool = player.AccessoriesInventory.Cake.Value;
- CakeAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedCake.Value;
- FaceoffPotionbool = player.AccessoriesInventory.FaceoffPotion.Value;
- FaceoffPotionAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedFaceoffPotion.Value;
- Bubblegumbool = player.AccessoriesInventory.Bubblegum.Value;
- BubblegumAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedBubblegum.Value;
- Monkeybool = player.AccessoriesInventory.Monkey.Value;
- MonkeyAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedMonkey.Value;
- NoiseMakerbool = player.AccessoriesInventory.NoiseMaker.Value;
- NoiseMakerAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedNoiseMaker.Value;
- ApplePiebool = player.AccessoriesInventory.ApplePie.Value;
- ApplePieAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedApplePie.Value;
- PandaFriendbool = player.AccessoriesInventory.PandaFriend.Value;
- PandaFriendAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedPandaFriend.Value;
- BangGunbool = player.AccessoriesInventory.BangGun.Value;
- BangGunAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedBangGun.Value;
- WhopeeCushionbool = player.AccessoriesInventory.WhopeeCushion.Value;
- WhopeeCushionAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWhopeeCushion.Value;
- WoodenSwordbool = player.AccessoriesInventory.WoodenSword.Value;
- WoodenSwordAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWoodenSword.Value;
- Dragonbool = player.AccessoriesInventory.Dragon.Value;
- DragonAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedDragon.Value;
- WoodenStaffbool = player.AccessoriesInventory.WoodenStaff.Value;
- WoodenStaffAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedWoodenStaff.Value;
- Spraybool = player.AccessoriesInventory.Spray.Value;
- SprayAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedSpray.Value;
- ClownBombbool = player.AccessoriesInventory.ClownBomb.Value;
- ClownBombAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedClownBomb.Value;
- ChameleonPotionbool = player.AccessoriesInventory.ChameleonPotion.Value;
- ChameleonPotionAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedChameleonPotion.Value;
- SpyDronebool = player.AccessoriesInventory.SpyDrone.Value;
- SpyDroneAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedSpyDrone.Value;
- Moneybagbool = player.AccessoriesInventory.Moneybag.Value;
- MoneybagAccessory = player.AccessoriesInventory.EquippedAccessories.EquippedMoneybag.Value;
- }
- local success, errormessage = pcall(function()
- dataStore:SetAsync(PlayerUserId, data)
- end)
- if success then
- print("Accessories successfully saved:)")
- else
- print("There was an error!")
- warn(errormessage)
- end
- end)
- game:BindToClose(function()
- --when game is ready to shutdown
- for i, player in pairs(game.Players:GetPlayers()) do
- if player then
- player:Kick("This game has shutted down")
- end
- end
- wait(5)
- end)
- game.ReplicatedStorage.Accessories.Events.GiveAccessory1.OnServerInvoke = function(player, GobletName)
- if debounce == true then
- debounce = false
- --print("RemoteFunction fired")
- local GobletifsInInventory
- local bool = player.AccessoriesInventory:FindFirstChild("Goblet")
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- if player.Backpack:FindFirstChild("Goblet") then
- GobletifsInInventory = true
- end
- if Goblet then
- if Goblet:FindFirstChild("Price") then
- if not GobletifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Goblet.Price.Value and bool.Value == false then
- print(player.Name.." brought the ".. Goblet.Name.." item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Goblet.Price.Value
- local giveTool = ReplicatedStorage.Accessories:FindFirstChild(Goblet.Name):Clone()
- giveTool.Parent = player.Backpack
- local giveTool2 = ReplicatedStorage.Accessories:FindFirstChild(Goblet.Name):Clone()
- giveTool2.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedGoblet").Value = Goblet.Name
- bool.Value = true
- GobletifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Goblet.Price.Value and not GobletifsInInventory and bool.Value == false then --and bool.Value == false
- return "NotEnough"
- end --if player.leaderstats.Coins.Value < Goblet.Price.Value then --and bool.Value == false
- --return "NotEnough"
- --end
- if bool.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedGoblet").Value ~= Goblet.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedGoblet").Value = Goblet.Name
- local giveTool = ReplicatedStorage.Accessories:FindFirstChild(Goblet.Name):Clone()
- giveTool.Parent = player.Backpack
- local giveTool = ReplicatedStorage.Accessories:FindFirstChild(Goblet.Name):Clone()
- giveTool.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedGoblet").Value == Goblet.Name and bool.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedGoblet").Value = ""
- --local itemName = "Goblet" --Change this
- -- local Char = player.Character or player.CharactedAdded:Wait()
- -- local GearInCharacter = Char:findFirstChild("Goblet")
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Goblet")then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Goblet"):Destroy()
- player.StarterGear:FindFirstChild("Goblet"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory2.OnServerInvoke = function(player,ChocolateMilkName)
- if debounce == true then
- debounce = false
- local ChocolateMilkifsInInventory
- local bool2 = player.AccessoriesInventory:FindFirstChild("ChocolateMilk")
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- if player.Backpack:FindFirstChild("ChocolateMilk") then
- ChocolateMilkifsInInventory = true
- end
- if ChocolateMilk then
- if ChocolateMilk:FindFirstChild("Price") then
- if not ChocolateMilkifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= ChocolateMilk.Price.Value and bool2.Value == false then
- print(player.Name.." brought the Chocolate Milk item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - ChocolateMilk.Price.Value
- local giveTool2 = ReplicatedStorage.Accessories:FindFirstChild("ChocolateMilk"):Clone()
- giveTool2.Parent = player.Backpack
- local giveTool2 = ReplicatedStorage.Accessories:FindFirstChild("ChocolateMilk"):Clone()
- giveTool2.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChocolateMilk").Value = ChocolateMilk.Name
- bool2.Value = true
- ChocolateMilkifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < ChocolateMilk.Price.Value and not ChocolateMilkifsInInventory and bool2.Value == false then
- print("NotChocolate")
- return "NotEnough"
- end
- if bool2.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChocolateMilk").Value ~= ChocolateMilk.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChocolateMilk").Value = ChocolateMilk.Name
- local giveTool2 = ReplicatedStorage.Accessories:FindFirstChild("ChocolateMilk"):Clone()
- giveTool2.Parent = player.Backpack
- local giveTool2 = ReplicatedStorage.Accessories:FindFirstChild("ChocolateMilk"):Clone()
- giveTool2.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChocolateMilk").Value == ChocolateMilk.Name and bool2.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChocolateMilk").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("ChocolateMilk")then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("ChocolateMilk"):Destroy()
- player.StarterGear:FindFirstChild("ChocolateMilk"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory3.OnServerInvoke = function(player,StarBloxCoffeeName)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local StarBloxCoffeeifsInInventory
- local bool3 = player.AccessoriesInventory:FindFirstChild("StarBloxCoffee")
- if player.Backpack:FindFirstChild("StarBloxCoffee") then
- StarBloxCoffeeifsInInventory = true
- end
- if StarBloxCoffee then
- if StarBloxCoffee:FindFirstChild("Price") then
- if not StarBloxCoffeeifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= StarBloxCoffee.Price.Value and bool3.Value == false then
- print(player.Name.." brought the StarBlox Coffee item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - StarBloxCoffee.Price.Value
- local giveTool3 = ReplicatedStorage.Accessories:FindFirstChild("StarBloxCoffee"):Clone()
- giveTool3.Parent = player.Backpack
- local giveTool3 = ReplicatedStorage.Accessories:FindFirstChild("StarBloxCoffee"):Clone()
- giveTool3.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedStarBloxCoffee").Value = StarBloxCoffee.Name
- bool3.Value = true
- StarBloxCoffeeifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < StarBloxCoffee.Price.Value and not StarBloxCoffeeifsInInventory and bool3.Value == false then
- return "NotEnough"
- end
- if bool3.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedStarBloxCoffee").Value ~= StarBloxCoffee.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedStarBloxCoffee").Value = StarBloxCoffee.Name
- local giveTool3 = ReplicatedStorage.Accessories:FindFirstChild("StarBloxCoffee"):Clone()
- giveTool3.Parent = player.Backpack
- local giveTool3 = ReplicatedStorage.Accessories:FindFirstChild("StarBloxCoffee"):Clone()
- giveTool3.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedStarBloxCoffee").Value == StarBloxCoffee.Name and bool3.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedStarBloxCoffee").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("StarBloxCoffee") then --:IsA("Tool")
- if humanoid then
- --print("Im Unequipped")
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("StarBloxCoffee"):Destroy()
- player.StarterGear:FindFirstChild("StarBloxCoffee"):Destroy()
- return "Unequip"
- end
- -- player.Backpack:FindFirstChild("StarBloxCoffee").Unequipped:Connect(function()
- --player.Backpack:FindFirstChild("StarBloxCoffee"):Destroy()
- -- player.StarterGear:FindFirstChild("StarBloxCoffee"):Destroy()
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory4.OnServerInvoke = function(player,HotdogName)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local HotdogifsInInventory
- local bool4 = player.AccessoriesInventory:FindFirstChild("Hotdog")
- if player.Backpack:FindFirstChild("HotDog") then
- HotdogifsInInventory = true
- end
- if HotDog then
- if HotDog:FindFirstChild("Price") then
- if not HotdogifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= HotDog.Price.Value and bool4.Value == false then
- print(player.Name.." brought the Hot Dog item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - HotDog.Price.Value
- local giveTool4 = ReplicatedStorage.Accessories:FindFirstChild("HotDog"):Clone()
- giveTool4.Parent = player.Backpack
- local giveTool4 = ReplicatedStorage.Accessories:FindFirstChild("HotDog"):Clone()
- giveTool4.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedHotdog").Value = HotDog.Name
- bool4.Value = true
- HotdogifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < HotDog.Price.Value and not HotdogifsInInventory and bool4.Value == false then
- return "NotEnough"
- end
- if bool4.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedHotdog").Value ~= HotDog.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedHotdog").Value = HotDog.Name
- local giveTool4 = ReplicatedStorage.Accessories:FindFirstChild("HotDog"):Clone()
- giveTool4.Parent = player.Backpack
- local giveTool4 = ReplicatedStorage.Accessories:FindFirstChild("HotDog"):Clone()
- giveTool4.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedHotdog").Value == HotDog.Name and bool4.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedHotdog").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("HotDog") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("HotDog"):Destroy()
- player.StarterGear:FindFirstChild("HotDog"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory5.OnServerInvoke = function(player,TeddyBloxpin)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local TeddyBloxpinifsInInventory
- local bool5 = player.AccessoriesInventory:FindFirstChild("TeddyBloxpin")
- if player.Backpack:FindFirstChild("TeddyBloxpin") then
- TeddyBloxpinifsInInventory = true
- end
- if TeddyBloxpin then
- if TeddyBloxpin:FindFirstChild("Price") then
- if not TeddyBloxpinifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= TeddyBloxpin.Price.Value and bool5.Value == false then
- print(player.Name.." brought the Teddy Bloxpin item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - TeddyBloxpin.Price.Value
- local giveTool5 = ReplicatedStorage.Accessories:FindFirstChild("TeddyBloxpin"):Clone()
- giveTool5.Parent = player.Backpack
- local giveTool5 = ReplicatedStorage.Accessories:FindFirstChild("TeddyBloxpin"):Clone()
- giveTool5.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTeddyBloxpin").Value = TeddyBloxpin.Name
- bool5.Value = true
- TeddyBloxpinifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < TeddyBloxpin.Price.Value and not TeddyBloxpinifsInInventory and bool5.Value == false then
- return "NotEnough"
- end
- if bool5.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTeddyBloxpin").Value ~= TeddyBloxpin.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTeddyBloxpin").Value = TeddyBloxpin.Name
- local giveTool5 = ReplicatedStorage.Accessories:FindFirstChild("TeddyBloxpin"):Clone()
- giveTool5.Parent = player.Backpack
- local giveTool5 = ReplicatedStorage.Accessories:FindFirstChild("TeddyBloxpin"):Clone()
- giveTool5.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTeddyBloxpin").Value == TeddyBloxpin.Name and bool5.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTeddyBloxpin").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("TeddyBloxpin") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("TeddyBloxpin"):Destroy()
- player.StarterGear:FindFirstChild("TeddyBloxpin"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory6.OnServerInvoke = function(player,PirateJuice)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local PirateJuiceifsInInventory
- local bool6 = player.AccessoriesInventory:FindFirstChild("PirateJuice")
- if player.Backpack:FindFirstChild("PirateJuice") then
- PirateJuiceifsInInventory = true
- end
- if PirateJuice then
- if PirateJuice:FindFirstChild("Price") then
- if not PirateJuiceifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= PirateJuice.Price.Value and bool6.Value == false then
- print(player.Name.." brought the Pirate Juice item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - PirateJuice.Price.Value
- local giveTool6 = ReplicatedStorage.Accessories:FindFirstChild("PirateJuice"):Clone()
- giveTool6.Parent = player.Backpack
- local giveTool6 = ReplicatedStorage.Accessories:FindFirstChild("PirateJuice"):Clone()
- giveTool6.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPirateJuice").Value = PirateJuice.Name
- bool6.Value = true
- PirateJuiceifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < PirateJuice.Price.Value and not PirateJuiceifsInInventory and bool6.Value == false then
- return "NotEnough"
- end
- if bool6.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPirateJuice").Value ~= PirateJuice.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPirateJuice").Value = PirateJuice.Name
- local giveTool6 = ReplicatedStorage.Accessories:FindFirstChild("PirateJuice"):Clone()
- giveTool6.Parent = player.Backpack
- local giveTool6 = ReplicatedStorage.Accessories:FindFirstChild("PirateJuice"):Clone()
- giveTool6.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPirateJuice").Value == PirateJuice.Name and bool6.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPirateJuice").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("PirateJuice") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("PirateJuice"):Destroy()
- player.StarterGear:FindFirstChild("PirateJuice"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory7.OnServerInvoke = function(player,Taco)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local TacoifsInInventory
- local bool7 = player.AccessoriesInventory:FindFirstChild("Taco")
- if player.Backpack:FindFirstChild("Taco") then
- TacoifsInInventory = true
- end
- if Taco then
- if Taco:FindFirstChild("Price") then
- if not TacoifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Taco.Price.Value and bool7.Value == false then
- print(player.Name.." brought the Taco item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Taco.Price.Value
- local giveTool7 = ReplicatedStorage.Accessories:FindFirstChild("Taco"):Clone()
- giveTool7.Parent = player.Backpack
- local giveTool7 = ReplicatedStorage.Accessories:FindFirstChild("Taco"):Clone()
- giveTool7.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTaco").Value = Taco.Name
- bool7.Value = true
- TacoifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Taco.Price.Value and not TacoifsInInventory and bool7.Value == false then
- return "NotEnough"
- end
- if bool7.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTaco").Value ~= Taco.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTaco").Value = Taco.Name
- local giveTool7 = ReplicatedStorage.Accessories:FindFirstChild("Taco"):Clone()
- giveTool7.Parent = player.Backpack
- local giveTool7 = ReplicatedStorage.Accessories:FindFirstChild("Taco"):Clone()
- giveTool7.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTaco").Value == Taco.Name and bool7.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTaco").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Taco") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Taco"):Destroy()
- player.StarterGear:FindFirstChild("Taco"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory8.OnServerInvoke = function(player,Watermelon)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WatermelonifsInInventory
- local bool8 = player.AccessoriesInventory:FindFirstChild("Watermelon")
- if player.Backpack:FindFirstChild("Watermelon") then
- WatermelonifsInInventory = true
- end
- if Watermelon then
- if Watermelon:FindFirstChild("Price") then
- if not WatermelonifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Watermelon.Price.Value and bool8.Value == false then
- print(player.Name.." brought the Watermelon item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Watermelon.Price.Value
- local giveTool8 = ReplicatedStorage.Accessories:FindFirstChild("Watermelon"):Clone()
- giveTool8.Parent = player.Backpack
- local giveTool8 = ReplicatedStorage.Accessories:FindFirstChild("Watermelon"):Clone()
- giveTool8.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWatermelon").Value = Watermelon.Name
- bool8.Value = true
- WatermelonifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Watermelon.Price.Value and not WatermelonifsInInventory and bool8.Value == false then
- return "NotEnough"
- end
- if bool8.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWatermelon").Value ~= Watermelon.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWatermelon").Value = Watermelon.Name
- local giveTool8 = ReplicatedStorage.Accessories:FindFirstChild("Watermelon"):Clone()
- giveTool8.Parent = player.Backpack
- local giveTool8 = ReplicatedStorage.Accessories:FindFirstChild("Watermelon"):Clone()
- giveTool8.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWatermelon").Value == Watermelon.Name and bool8.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWatermelon").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Watermelon") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Watermelon"):Destroy()
- player.StarterGear:FindFirstChild("Watermelon"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory9.OnServerInvoke = function(player,Pizza)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local PizzaifsInInventory
- local bool9 = player.AccessoriesInventory:FindFirstChild("Pizza")
- if player.Backpack:FindFirstChild("Pizza") then
- PizzaifsInInventory = true
- end
- if Pizza then
- if Pizza:FindFirstChild("Price") then
- if not PizzaifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Pizza.Price.Value and bool9.Value == false then
- print(player.Name.." brought the Watermelon item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Pizza.Price.Value
- local giveTool9 = ReplicatedStorage.Accessories:FindFirstChild("Pizza"):Clone()
- giveTool9.Parent = player.Backpack
- local giveTool9 = ReplicatedStorage.Accessories:FindFirstChild("Pizza"):Clone()
- giveTool9.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPizza").Value = Pizza.Name
- bool9.Value = true
- PizzaifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Pizza.Price.Value and not PizzaifsInInventory and bool9.Value == false then
- return "NotEnough"
- end
- if bool9.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPizza").Value ~=Pizza.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPizza").Value = Pizza.Name
- local giveTool9 = ReplicatedStorage.Accessories:FindFirstChild("Pizza"):Clone()
- giveTool9.Parent = player.Backpack
- local giveTool9 = ReplicatedStorage.Accessories:FindFirstChild("Pizza"):Clone()
- giveTool9.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPizza").Value == Pizza.Name and bool9.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPizza").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Pizza") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Pizza"):Destroy()
- player.StarterGear:FindFirstChild("Pizza"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory10.OnServerInvoke = function(player,FoamFinger)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local FoamFingerifsInInventory
- local bool10 = player.AccessoriesInventory:FindFirstChild("FoamFinger")
- if player.Backpack:FindFirstChild("FoamFinger") then
- FoamFingerifsInInventory = true
- end
- if FoamFinger then
- if FoamFinger:FindFirstChild("Price") then
- if not FoamFingerifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= FoamFinger.Price.Value and bool10.Value == false then
- print(player.Name.." brought the Foam Finger item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - FoamFinger.Price.Value
- local giveTool10 = ReplicatedStorage.Accessories:FindFirstChild("FoamFinger"):Clone()
- giveTool10.Parent = player.Backpack
- local giveTool10 = ReplicatedStorage.Accessories:FindFirstChild("FoamFinger"):Clone()
- giveTool10.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFoamFinger").Value = FoamFinger.Name
- bool10.Value = true
- FoamFingerifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < FoamFinger.Price.Value and not FoamFingerifsInInventory and bool10.Value == false then
- return "NotEnough"
- end
- if bool10.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFoamFinger").Value ~= FoamFinger.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFoamFinger").Value = FoamFinger.Name
- local giveTool10 = ReplicatedStorage.Accessories:FindFirstChild("FoamFinger"):Clone()
- giveTool10.Parent = player.Backpack
- local giveTool10 = ReplicatedStorage.Accessories:FindFirstChild("FoamFinger"):Clone()
- giveTool10.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFoamFinger").Value == FoamFinger.Name and bool10.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFoamFinger").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("FoamFinger") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("FoamFinger"):Destroy()
- player.StarterGear:FindFirstChild("FoamFinger"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory11.OnServerInvoke = function(player,Compass)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local CompassifsInInventory
- local bool11 = player.AccessoriesInventory:FindFirstChild("Compass")
- if player.Backpack:FindFirstChild("Compass") then
- CompassifsInInventory = true
- end
- if Compass then
- if Compass:FindFirstChild("Price") then
- if not CompassifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= FoamFinger.Price.Value and bool11.Value == false then
- print(player.Name.." brought the Compass item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Compass.Price.Value
- local giveTool11 = ReplicatedStorage.Accessories:FindFirstChild("Compass"):Clone()
- giveTool11.Parent = player.Backpack
- local giveTool11 = ReplicatedStorage.Accessories:FindFirstChild("Compass"):Clone()
- giveTool11.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCompass").Value = Compass.Name
- bool11.Value = true
- CompassifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Compass.Price.Value and not CompassifsInInventory and bool11.Value == false then
- return "NotEnough"
- end
- if bool11.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCompass").Value ~= Compass.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCompass").Value = Compass.Name
- local giveTool11 = ReplicatedStorage.Accessories:FindFirstChild("Compass"):Clone()
- giveTool11.Parent = player.Backpack
- local giveTool11 = ReplicatedStorage.Accessories:FindFirstChild("Compass"):Clone()
- giveTool11.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCompass").Value == Compass.Name and bool11.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCompass").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Compass") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Compass"):Destroy()
- player.StarterGear:FindFirstChild("Compass"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- -- end)
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory12.OnServerInvoke = function(player,TomsBeans)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local TomsBeansifsInInventory
- local bool12 = player.AccessoriesInventory:FindFirstChild("TomsBeans")
- if player.Backpack:FindFirstChild("TomsBeans") then
- TomsBeansifsInInventory = true
- end
- if TomsBeans then
- if TomsBeans:FindFirstChild("Price") then
- if not TomsBeansifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= TomsBeans.Price.Value and bool12.Value == false then
- print(player.Name.." brought the Tom's Beans item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - TomsBeans.Price.Value
- local giveTool12 = ReplicatedStorage.Accessories:FindFirstChild("TomsBeans"):Clone()
- giveTool12.Parent = player.Backpack
- local giveTool12 = ReplicatedStorage.Accessories:FindFirstChild("TomsBeans"):Clone()
- giveTool12.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTomsBeans").Value = TomsBeans.Name
- bool12.Value = true
- TomsBeansifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < TomsBeans.Price.Value and not TomsBeansifsInInventory and bool12.Value == false then
- return "NotEnough"
- end
- if bool12.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTomsBeans").Value ~= TomsBeans.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTomsBeans").Value = TomsBeans.Name
- local giveTool12 = ReplicatedStorage.Accessories:FindFirstChild("TomsBeans"):Clone()
- giveTool12.Parent = player.Backpack
- local giveTool12 = ReplicatedStorage.Accessories:FindFirstChild("TomsBeans"):Clone()
- giveTool12.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTomsBeans").Value == TomsBeans.Name and bool12.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTomsBeans").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("TomsBeans") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("TomsBeans"):Destroy()
- player.StarterGear:FindFirstChild("TomsBeans"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory13.OnServerInvoke = function(player,IceCream)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local IceCreamifsInInventory
- local bool13 = player.AccessoriesInventory:FindFirstChild("IceCream")
- if player.Backpack:FindFirstChild("IceCream") then
- IceCreamifsInInventory = true
- end
- if IceCream then
- if IceCream:FindFirstChild("Price") then
- if not IceCreamifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= IceCream.Price.Value and bool13.Value == false then
- print(player.Name.." brought the Ice Cream item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - IceCream.Price.Value
- local giveTool13 = ReplicatedStorage.Accessories:FindFirstChild("IceCream"):Clone()
- giveTool13.Parent = player.Backpack
- local giveTool13 = ReplicatedStorage.Accessories:FindFirstChild("IceCream"):Clone()
- giveTool13.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedIceCream").Value = IceCream.Name
- bool13.Value = true
- IceCreamifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < IceCream.Price.Value and not IceCreamifsInInventory and bool13.Value == false then
- return "NotEnough"
- end
- if bool13.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedIceCream").Value ~= IceCream.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedIceCream").Value = IceCream.Name
- local giveTool13 = ReplicatedStorage.Accessories:FindFirstChild("IceCream"):Clone()
- giveTool13.Parent = player.Backpack
- local giveTool13 = ReplicatedStorage.Accessories:FindFirstChild("IceCream"):Clone()
- giveTool13.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedIceCream").Value == IceCream.Name and bool13.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedIceCream").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("IceCream") then --:IsA("Tool")
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("IceCream"):Destroy()
- player.StarterGear:FindFirstChild("IceCream"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory14.OnServerInvoke = function(player,Waffle)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WaffleifsInInventory
- local bool14 = player.AccessoriesInventory:FindFirstChild("Waffle")
- if player.Backpack:FindFirstChild("Waffle") then
- WaffleifsInInventory = true
- end
- if Waffle then
- if Waffle:FindFirstChild("Price") then
- if not WaffleifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Waffle.Price.Value and bool14.Value == false then
- print(player.Name.." brought the Waffle item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Waffle.Price.Value
- local giveTool14 = ReplicatedStorage.Accessories:FindFirstChild("Waffle"):Clone()
- giveTool14.Parent = player.Backpack
- local giveTool14 = ReplicatedStorage.Accessories:FindFirstChild("Waffle"):Clone()
- giveTool14.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWaffle").Value = Waffle.Name
- bool14.Value = true
- WaffleifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Waffle.Price.Value and not WaffleifsInInventory and bool14.Value == false then
- return "NotEnough"
- end
- if bool14.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWaffle").Value ~= Waffle.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWaffle").Value = Waffle.Name
- local giveTool14 = ReplicatedStorage.Accessories:FindFirstChild("Waffle"):Clone()
- giveTool14.Parent = player.Backpack
- local giveTool14 = ReplicatedStorage.Accessories:FindFirstChild("Waffle"):Clone()
- giveTool14.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWaffle").Value == Waffle.Name and bool14.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWaffle").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Waffle") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Waffle"):Destroy()
- player.StarterGear:FindFirstChild("Waffle"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory15.OnServerInvoke = function(player,WitchesBrew)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WitchesBrewifsInInventory
- local bool15 = player.AccessoriesInventory:FindFirstChild("WitchesBrew")
- if player.Backpack:FindFirstChild("Waffle") then
- WitchesBrewifsInInventory = true
- end
- if WitchesBrew then
- if WitchesBrew:FindFirstChild("Price") then
- if not WitchesBrewifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= WitchesBrew.Price.Value and bool15.Value == false then
- print(player.Name.." brought the Witches Brew item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - WitchesBrew.Price.Value
- local giveTool15 = ReplicatedStorage.Accessories:FindFirstChild("WitchesBrew"):Clone()
- giveTool15.Parent = player.Backpack
- local giveTool15 = ReplicatedStorage.Accessories:FindFirstChild("WitchesBrew"):Clone()
- giveTool15.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWitchesBrew").Value = WitchesBrew.Name
- bool15.Value = true
- WitchesBrewifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < WitchesBrew.Price.Value and not WitchesBrewifsInInventory and bool15.Value == false then
- return "NotEnough"
- end
- if bool15.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWitchesBrew").Value ~= WitchesBrew.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWitchesBrew").Value = WitchesBrew.Name
- local giveTool15 = ReplicatedStorage.Accessories:FindFirstChild("WitchesBrew"):Clone()
- giveTool15.Parent = player.Backpack
- local giveTool15 = ReplicatedStorage.Accessories:FindFirstChild("WitchesBrew"):Clone()
- giveTool15.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWitchesBrew").Value == WitchesBrew.Name and bool15.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWitchesBrew").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("WitchesBrew") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("WitchesBrew"):Destroy()
- player.StarterGear:FindFirstChild("WitchesBrew"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory16.OnServerInvoke = function(player,Torch)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local TorchifsInInventory
- local bool16 = player.AccessoriesInventory:FindFirstChild("Torch")
- if player.Backpack:FindFirstChild("Torch") then
- TorchifsInInventory = true
- end
- if Torch then
- if Torch:FindFirstChild("Price") then
- if not TorchifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Torch.Price.Value and bool16.Value == false then
- print(player.Name.." brought the Torch item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Torch.Price.Value
- local giveTool16 = ReplicatedStorage.Accessories:FindFirstChild("Torch"):Clone()
- giveTool16.Parent = player.Backpack
- local giveTool16 = ReplicatedStorage.Accessories:FindFirstChild("Torch"):Clone()
- giveTool16.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTorch").Value = Torch.Name
- bool16.Value = true
- TorchifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Torch.Price.Value and not TorchifsInInventory and bool16.Value == false then
- return "NotEnough"
- end
- if bool16.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTorch").Value ~= Torch.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTorch").Value = Torch.Name
- local giveTool16 = ReplicatedStorage.Accessories:FindFirstChild("Torch"):Clone()
- giveTool16.Parent = player.Backpack
- local giveTool16 = ReplicatedStorage.Accessories:FindFirstChild("Torch"):Clone()
- giveTool16.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTorch").Value == Torch.Name and bool16.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedTorch").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Torch") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Torch"):Destroy()
- player.StarterGear:FindFirstChild("Torch"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory17.OnServerInvoke = function(player,BloxxyRadar)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local BloxxyRadarifsInInventory
- local bool17 = player.AccessoriesInventory:FindFirstChild("BloxxyRadar")
- if player.Backpack:FindFirstChild("BloxxyRadar") then
- BloxxyRadarifsInInventory = true
- end
- if BloxxyRadar then
- if BloxxyRadar:FindFirstChild("Price") then
- if not BloxxyRadarifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= BloxxyRadar.Price.Value and bool17.Value == false then
- print(player.Name.." brought the BloxxyRadar item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - BloxxyRadar.Price.Value
- local giveTool17 = ReplicatedStorage.Accessories:FindFirstChild("BloxxyRadar"):Clone()
- giveTool17.Parent = player.Backpack
- local giveTool17 = ReplicatedStorage.Accessories:FindFirstChild("BloxxyRadar"):Clone()
- giveTool17.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBloxxyRadar").Value = BloxxyRadar.Name
- bool17.Value = true
- BloxxyRadarifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < BloxxyRadar.Price.Value and not BloxxyRadarifsInInventory and bool17.Value == false then
- return "NotEnough"
- end
- if bool17.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBloxxyRadar").Value ~= BloxxyRadar.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBloxxyRadar").Value = BloxxyRadar.Name
- local giveTool17 = ReplicatedStorage.Accessories:FindFirstChild("BloxxyRadar"):Clone()
- giveTool17.Parent = player.Backpack
- local giveTool17 = ReplicatedStorage.Accessories:FindFirstChild("BloxxyRadar"):Clone()
- giveTool17.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBloxxyRadar").Value == BloxxyRadar.Name and bool17.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBloxxyRadar").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("BloxxyRadar") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("BloxxyRadar"):Destroy()
- player.StarterGear:FindFirstChild("BloxxyRadar"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory18.OnServerInvoke = function(player,Moneybag)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local MoneybagifsInInventory
- local bool18 = player.AccessoriesInventory:FindFirstChild("Moneybag")
- if player.Backpack:FindFirstChild("Moneybag") then
- MoneybagifsInInventory = true
- end
- if Moneybag then
- if Moneybag:FindFirstChild("Price") then
- if not MoneybagifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Moneybag.Price.Value and bool18.Value == false then
- print(player.Name.." brought the Moneybag item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Moneybag.Price.Value
- local giveTool18 = ReplicatedStorage.Accessories:FindFirstChild("Moneybag"):Clone()
- giveTool18.Parent = player.Backpack
- local giveTool18 = ReplicatedStorage.Accessories:FindFirstChild("Moneybag"):Clone()
- giveTool18.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMoneybag").Value = Moneybag.Name
- bool18.Value = true
- MoneybagifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Moneybag.Price.Value and not MoneybagifsInInventory and bool18.Value == false then
- return "NotEnough"
- end
- if bool18.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMoneybag").Value ~= Moneybag.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMoneybag").Value = Moneybag.Name
- local giveTool18 = ReplicatedStorage.Accessories:FindFirstChild("Moneybag"):Clone()
- giveTool18.Parent = player.Backpack
- local giveTool18 = ReplicatedStorage.Accessories:FindFirstChild("Moneybag"):Clone()
- giveTool18.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMoneybag").Value == Moneybag.Name and bool18.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMoneybag").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Moneybag") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Moneybag"):Destroy()
- player.StarterGear:FindFirstChild("Moneybag"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory19.OnServerInvoke = function(player,SpaceSandwitch)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local SpaceSandwitchifsInInventory
- local bool19 = player.AccessoriesInventory:FindFirstChild("SpaceSandwitch")
- if player.Backpack:FindFirstChild("SpaceSandwitch") then
- SpaceSandwitchifsInInventory = true
- end
- if SpaceSandwitch then
- if SpaceSandwitch:FindFirstChild("Price") then
- if not SpaceSandwitchifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= SpaceSandwitch.Price.Value and bool19.Value == false then
- print(player.Name.." brought the SpaceSandwitch item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - SpaceSandwitch.Price.Value
- local giveTool19 = ReplicatedStorage.Accessories:FindFirstChild("SpaceSandwitch"):Clone()
- giveTool19.Parent = player.Backpack
- local giveTool19 = ReplicatedStorage.Accessories:FindFirstChild("SpaceSandwitch"):Clone()
- giveTool19.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpaceSandwitch").Value = SpaceSandwitch.Name
- bool19.Value = true
- SpaceSandwitchifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < SpaceSandwitch.Price.Value and not SpaceSandwitchifsInInventory and bool19.Value == false then
- return "NotEnough"
- end
- if bool19.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpaceSandwitch").Value ~= SpaceSandwitch.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpaceSandwitch").Value = SpaceSandwitch.Name
- local giveTool19 = ReplicatedStorage.Accessories:FindFirstChild("SpaceSandwitch"):Clone()
- giveTool19.Parent = player.Backpack
- local giveTool19 = ReplicatedStorage.Accessories:FindFirstChild("SpaceSandwitch"):Clone()
- giveTool19.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpaceSandwitch").Value == SpaceSandwitch.Name and bool19.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpaceSandwitch").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("SpaceSandwitch") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("SpaceSandwitch"):Destroy()
- player.StarterGear:FindFirstChild("SpaceSandwitch"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory20.OnServerInvoke = function(player,Cake)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local CakeifsInInventory
- local bool20 = player.AccessoriesInventory:FindFirstChild("Cake")
- if player.Backpack:FindFirstChild("Cake") then
- CakeifsInInventory = true
- end
- if Cake then
- if Cake:FindFirstChild("Price") then
- if not CakeifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Cake.Price.Value and bool20.Value == false then
- print(player.Name.." brought the Cake item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Cake.Price.Value
- local giveTool20 = ReplicatedStorage.Accessories:FindFirstChild("Cake"):Clone()
- giveTool20.Parent = player.Backpack
- local giveTool20 = ReplicatedStorage.Accessories:FindFirstChild("Cake"):Clone()
- giveTool20.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCake").Value = Cake.Name
- bool20.Value = true
- CakeifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Cake.Price.Value and not CakeifsInInventory and bool20.Value == false then
- return "NotEnough"
- end
- if bool20.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCake").Value ~= Cake.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCake").Value = Cake.Name
- local giveTool20 = ReplicatedStorage.Accessories:FindFirstChild("Cake"):Clone()
- giveTool20.Parent = player.Backpack
- local giveTool20 = ReplicatedStorage.Accessories:FindFirstChild("Cake"):Clone()
- giveTool20.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCake").Value == Cake.Name and bool20.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedCake").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Cake") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Cake"):Destroy()
- player.StarterGear:FindFirstChild("Cake"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory21.OnServerInvoke = function(player,FaceoffPotion)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local FaceoffPotionifsInInventory
- local bool21 = player.AccessoriesInventory:FindFirstChild("FaceoffPotion")
- if player.Backpack:FindFirstChild("FaceoffPotion") then
- FaceoffPotionifsInInventory = true
- end
- if FaceoffPotion then
- if FaceoffPotion:FindFirstChild("Price") then
- if not FaceoffPotionifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= FaceoffPotion.Price.Value and bool21.Value == false then
- print(player.Name.." brought the FaceoffPotion item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - FaceoffPotion.Price.Value
- local giveTool21 = ReplicatedStorage.Accessories:FindFirstChild("FaceoffPotion"):Clone()
- giveTool21.Parent = player.Backpack
- local giveTool21 = ReplicatedStorage.Accessories:FindFirstChild("FaceoffPotion"):Clone()
- giveTool21.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFaceoffPotion").Value = FaceoffPotion.Name
- bool21.Value = true
- FaceoffPotionifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < FaceoffPotion.Price.Value and not FaceoffPotionifsInInventory and bool21.Value == false then
- return "NotEnough"
- end
- if bool21.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFaceoffPotion").Value ~= FaceoffPotion.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFaceoffPotion").Value = FaceoffPotion.Name
- local giveTool21 = ReplicatedStorage.Accessories:FindFirstChild("FaceoffPotion"):Clone()
- giveTool21.Parent = player.Backpack
- local giveTool21 = ReplicatedStorage.Accessories:FindFirstChild("FaceoffPotion"):Clone()
- giveTool21.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFaceoffPotion").Value == FaceoffPotion.Name and bool21.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedFaceoffPotion").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("FaceoffPotion") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("FaceoffPotion"):Destroy()
- player.StarterGear:FindFirstChild("FaceoffPotion"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory22.OnServerInvoke = function(player,Bubblegum)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local BubblegumifsInInventory
- local bool22 = player.AccessoriesInventory:FindFirstChild("Bubblegum")
- if player.Backpack:FindFirstChild("Bubblegum") then
- BubblegumifsInInventory = true
- end
- if Bubblegum then
- if Bubblegum:FindFirstChild("Price") then
- if not BubblegumifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Bubblegum.Price.Value and bool22.Value == false then
- print(player.Name.." brought the Bubblegum item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Bubblegum.Price.Value
- local giveTool22 = ReplicatedStorage.Accessories:FindFirstChild("Bubblegum"):Clone()
- giveTool22.Parent = player.Backpack
- local giveTool22 = ReplicatedStorage.Accessories:FindFirstChild("Bubblegum"):Clone()
- giveTool22.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBubblegum").Value = Bubblegum.Name
- bool22.Value = true
- BubblegumifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Bubblegum.Price.Value and not BubblegumifsInInventory and bool22.Value == false then
- return "NotEnough"
- end
- if bool22.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBubblegum").Value ~= Bubblegum.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBubblegum").Value = Bubblegum.Name
- local giveTool22 = ReplicatedStorage.Accessories:FindFirstChild("Bubblegum"):Clone()
- giveTool22.Parent = player.Backpack
- local giveTool22 = ReplicatedStorage.Accessories:FindFirstChild("Bubblegum"):Clone()
- giveTool22.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBubblegum").Value == Bubblegum.Name and bool22.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBubblegum").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Bubblegum") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Bubblegum"):Destroy()
- player.StarterGear:FindFirstChild("Bubblegum"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory23.OnServerInvoke = function(player,Monkey)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local MonkeyifsInInventory
- local bool23 = player.AccessoriesInventory:FindFirstChild("Monkey")
- if player.Backpack:FindFirstChild("Monkey") then
- MonkeyifsInInventory = true
- end
- if Monkey then
- if Monkey:FindFirstChild("Price") then
- if not MonkeyifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Monkey.Price.Value and bool23.Value == false then
- print(player.Name.." brought the Monkey item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Monkey.Price.Value
- local giveTool23 = ReplicatedStorage.Accessories:FindFirstChild("Monkey"):Clone()
- giveTool23.Parent = player.Backpack
- local giveTool23 = ReplicatedStorage.Accessories:FindFirstChild("Monkey"):Clone()
- giveTool23.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMonkey").Value = Monkey.Name
- bool23.Value = true
- MonkeyifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Monkey.Price.Value and not MonkeyifsInInventory and bool23.Value == false then
- return "NotEnough"
- end
- if bool23.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMonkey").Value ~= Monkey.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMonkey").Value = Monkey.Name
- local giveTool23 = ReplicatedStorage.Accessories:FindFirstChild("Monkey"):Clone()
- giveTool23.Parent = player.Backpack
- local giveTool23 = ReplicatedStorage.Accessories:FindFirstChild("Monkey"):Clone()
- giveTool23.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMonkey").Value == Monkey.Name and bool23.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedMonkey").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Monkey") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Monkey"):Destroy()
- player.StarterGear:FindFirstChild("Monkey"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory24.OnServerInvoke = function(player,NoiseMaker)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local NoiseMakerifsInInventory
- local bool24 = player.AccessoriesInventory:FindFirstChild("NoiseMaker")
- if player.Backpack:FindFirstChild("NoiseMaker") then
- NoiseMakerifsInInventory = true
- end
- if NoiseMaker then
- if NoiseMaker:FindFirstChild("Price") then
- if not NoiseMakerifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= NoiseMaker.Price.Value and bool24.Value == false then
- print(player.Name.." brought the NoiseMaker item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - NoiseMaker.Price.Value
- local giveTool24 = ReplicatedStorage.Accessories:FindFirstChild("NoiseMaker"):Clone()
- giveTool24.Parent = player.Backpack
- local giveTool24 = ReplicatedStorage.Accessories:FindFirstChild("NoiseMaker"):Clone()
- giveTool24.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedNoiseMaker").Value = NoiseMaker.Name
- bool24.Value = true
- NoiseMakerifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < NoiseMaker.Price.Value and not NoiseMakerifsInInventory and bool24.Value == false then
- return "NotEnough"
- end
- if bool24.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedNoiseMaker").Value ~= NoiseMaker.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedNoiseMaker").Value = NoiseMaker.Name
- local giveTool24 = ReplicatedStorage.Accessories:FindFirstChild("NoiseMaker"):Clone()
- giveTool24.Parent = player.Backpack
- local giveTool24 = ReplicatedStorage.Accessories:FindFirstChild("NoiseMaker"):Clone()
- giveTool24.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedNoiseMaker").Value == NoiseMaker.Name and bool24.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedNoiseMaker").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("NoiseMaker") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("NoiseMaker"):Destroy()
- player.StarterGear:FindFirstChild("NoiseMaker"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory25.OnServerInvoke = function(player,ApplePie)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local ApplePieifsInInventory
- local bool25 = player.AccessoriesInventory:FindFirstChild("ApplePie")
- if player.Backpack:FindFirstChild("ApplePie") then
- ApplePieifsInInventory = true
- end
- if ApplePie then
- if ApplePie:FindFirstChild("Price") then
- if not ApplePieifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= ApplePie.Price.Value and bool25.Value == false then
- print(player.Name.." brought the Apple Pie item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - ApplePie.Price.Value
- local giveTool25 = ReplicatedStorage.Accessories:FindFirstChild("ApplePie"):Clone()
- giveTool25.Parent = player.Backpack
- local giveTool25 = ReplicatedStorage.Accessories:FindFirstChild("ApplePie"):Clone()
- giveTool25.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedApplePie").Value = ApplePie.Name
- bool25.Value = true
- ApplePieifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < ApplePie.Price.Value and not ApplePieifsInInventory and bool25.Value == false then
- return "NotEnough"
- end
- if bool25.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedApplePie").Value ~= ApplePie.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedApplePie").Value = ApplePie.Name
- local giveTool25 = ReplicatedStorage.Accessories:FindFirstChild("ApplePie"):Clone()
- giveTool25.Parent = player.Backpack
- local giveTool25 = ReplicatedStorage.Accessories:FindFirstChild("ApplePie"):Clone()
- giveTool25.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedApplePie").Value == ApplePie.Name and bool25.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedApplePie").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("ApplePie") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("ApplePie"):Destroy()
- player.StarterGear:FindFirstChild("ApplePie"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory26.OnServerInvoke = function(player,PandaFriend)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local PandaFriendifsInInventory
- local bool26 = player.AccessoriesInventory:FindFirstChild("PandaFriend")
- if player.Backpack:FindFirstChild("PandaFriend") then
- PandaFriendifsInInventory = true
- end
- if PandaFriend then
- if PandaFriend:FindFirstChild("Price") then
- if not PandaFriendifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= PandaFriend.Price.Value and bool26.Value == false then
- print(player.Name.." brought the Panda Friend item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - PandaFriend.Price.Value
- local giveTool26 = ReplicatedStorage.Accessories:FindFirstChild("PandaFriend"):Clone()
- giveTool26.Parent = player.Backpack
- local giveTool26 = ReplicatedStorage.Accessories:FindFirstChild("PandaFriend"):Clone()
- giveTool26.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPandaFriend").Value = PandaFriend.Name
- bool26.Value = true
- PandaFriendifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < PandaFriend.Price.Value and not PandaFriendifsInInventory and bool26.Value == false then
- return "NotEnough"
- end
- if bool26.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPandaFriend").Value ~= PandaFriend.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPandaFriend").Value = PandaFriend.Name
- local giveTool26 = ReplicatedStorage.Accessories:FindFirstChild("PandaFriend"):Clone()
- giveTool26.Parent = player.Backpack
- local giveTool26 = ReplicatedStorage.Accessories:FindFirstChild("PandaFriend"):Clone()
- giveTool26.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPandaFriend").Value == PandaFriend.Name and bool26.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedPandaFriend").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("PandaFriend") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("PandaFriend"):Destroy()
- player.StarterGear:FindFirstChild("PandaFriend"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory27.OnServerInvoke = function(player,BangGun)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local BangGunifsInInventory
- local bool27 = player.AccessoriesInventory:FindFirstChild("BangGun")
- if player.Backpack:FindFirstChild("BangGun") then
- BangGunifsInInventory = true
- end
- if BangGun then
- if BangGun:FindFirstChild("Price") then
- if not BangGunifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= BangGun.Price.Value and bool27.Value == false then
- print(player.Name.." brought the Bang Gun item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - BangGun.Price.Value
- local giveTool27 = ReplicatedStorage.Accessories:FindFirstChild("BangGun"):Clone()
- giveTool27.Parent = player.Backpack
- local giveTool27 = ReplicatedStorage.Accessories:FindFirstChild("BangGun"):Clone()
- giveTool27.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBangGun").Value = BangGun.Name
- bool27.Value = true
- BangGunifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < BangGun.Price.Value and not BangGunifsInInventory and bool27.Value == false then
- return "NotEnough"
- end
- if bool27.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBangGun").Value ~= BangGun.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBangGun").Value = BangGun.Name
- local giveTool27 = ReplicatedStorage.Accessories:FindFirstChild("BangGun"):Clone()
- giveTool27.Parent = player.Backpack
- local giveTool27 = ReplicatedStorage.Accessories:FindFirstChild("BangGun"):Clone()
- giveTool27.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBangGun").Value == BangGun.Name and bool27.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedBangGun").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("BangGun") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("BangGun"):Destroy()
- player.StarterGear:FindFirstChild("BangGun"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory28.OnServerInvoke = function(player,WhopeeCushion)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WhopeeCushionifsInInventory
- local bool28 = player.AccessoriesInventory:FindFirstChild("WhopeeCushion")
- if player.Backpack:FindFirstChild("WhopeeCushion") then
- WhopeeCushionifsInInventory = true
- end
- if WhopeeCushion then
- if WhopeeCushion:FindFirstChild("Price") then
- if not WhopeeCushionifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= WhopeeCushion.Price.Value and bool28.Value == false then
- print(player.Name.." brought the Whopee Cushion item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - WhopeeCushion.Price.Value
- local giveTool28 = ReplicatedStorage.Accessories:FindFirstChild("WhopeeCushion"):Clone()
- giveTool28.Parent = player.Backpack
- local giveTool28 = ReplicatedStorage.Accessories:FindFirstChild("WhopeeCushion"):Clone()
- giveTool28.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWhopeeCushion").Value = WhopeeCushion.Name
- bool28.Value = true
- WhopeeCushionifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < WhopeeCushion.Price.Value and not WhopeeCushionifsInInventory and bool28.Value == false then
- return "NotEnough"
- end
- if bool28.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWhopeeCushion").Value ~= WhopeeCushion.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWhopeeCushion").Value = WhopeeCushion.Name
- local giveTool28 = ReplicatedStorage.Accessories:FindFirstChild("WhopeeCushion"):Clone()
- giveTool28.Parent = player.Backpack
- local giveTool28 = ReplicatedStorage.Accessories:FindFirstChild("WhopeeCushion"):Clone()
- giveTool28.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWhopeeCushion").Value == WhopeeCushion.Name and bool28.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWhopeeCushion").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("WhopeeCushion") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("WhopeeCushion"):Destroy()
- player.StarterGear:FindFirstChild("WhopeeCushion"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory29.OnServerInvoke = function(player,WoodenSword)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WoodenSwordifsInInventory
- local bool29 = player.AccessoriesInventory:FindFirstChild("WoodenSword")
- if player.Backpack:FindFirstChild("WoodenSword") then
- WoodenSwordifsInInventory = true
- end
- if WoodenSword then
- if WoodenSword:FindFirstChild("Price") then
- if not WoodenSwordifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= WoodenSword.Price.Value and bool29.Value == false then
- print(player.Name.." brought the Wooden Sword item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - WoodenSword.Price.Value
- local giveTool29 = ReplicatedStorage.Accessories:FindFirstChild("WoodenSword"):Clone()
- giveTool29.Parent = player.Backpack
- local giveTool29 = ReplicatedStorage.Accessories:FindFirstChild("WoodenSword"):Clone()
- giveTool29.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenSword").Value = WoodenSword.Name
- bool29.Value = true
- WoodenSwordifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < WoodenSword.Price.Value and not WoodenSwordifsInInventory and bool29.Value == false then
- return "NotEnough"
- end
- if bool29.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenSword").Value ~= WoodenSword.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenSword").Value = WoodenSword.Name
- local giveTool29 = ReplicatedStorage.Accessories:FindFirstChild("WoodenSword"):Clone()
- giveTool29.Parent = player.Backpack
- local giveTool29 = ReplicatedStorage.Accessories:FindFirstChild("WoodenSword"):Clone()
- giveTool29.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenSword").Value == WoodenSword.Name and bool29.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenSword").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("WoodenSword") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("WoodenSword"):Destroy()
- player.StarterGear:FindFirstChild("WoodenSword"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory30.OnServerInvoke = function(player,Dragon)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local DragonifsInInventory
- local bool30 = player.AccessoriesInventory:FindFirstChild("Dragon")
- if player.Backpack:FindFirstChild("WoodenSword") then
- DragonifsInInventory = true
- end
- if Dragon then
- if Dragon:FindFirstChild("Price") then
- if not DragonifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Dragon.Price.Value and bool30.Value == false then
- print(player.Name.." brought the Dragon item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Dragon.Price.Value
- local giveTool30 = ReplicatedStorage.Accessories:FindFirstChild("Dragon"):Clone()
- giveTool30.Parent = player.Backpack
- local giveTool30 = ReplicatedStorage.Accessories:FindFirstChild("Dragon"):Clone()
- giveTool30.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedDragon").Value = Dragon.Name
- bool30.Value = true
- DragonifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Dragon.Price.Value and not DragonifsInInventory and bool30.Value == false then
- return "NotEnough"
- end
- if bool30.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedDragon").Value ~= Dragon.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedDragon").Value = Dragon.Name
- local giveTool30 = ReplicatedStorage.Accessories:FindFirstChild("Dragon"):Clone()
- giveTool30.Parent = player.Backpack
- local giveTool30 = ReplicatedStorage.Accessories:FindFirstChild("Dragon"):Clone()
- giveTool30.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedDragon").Value == Dragon.Name and bool30.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedDragon").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Dragon") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Dragon"):Destroy()
- player.StarterGear:FindFirstChild("Dragon"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory31.OnServerInvoke = function(player,WoodenStaff)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local WoodenStaffifsInInventory
- local bool31 = player.AccessoriesInventory:FindFirstChild("WoodenStaff")
- if player.Backpack:FindFirstChild("WoodenStaff") then
- WoodenStaffifsInInventory = true
- end
- if WoodenStaff then
- if WoodenStaff:FindFirstChild("Price") then
- if not WoodenStaffifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= WoodenStaff.Price.Value and bool31.Value == false then
- print(player.Name.." brought the StaffofTheWoodlands item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - WoodenStaff.Price.Value
- local giveTool31 = ReplicatedStorage.Accessories:FindFirstChild("WoodenStaff"):Clone()
- giveTool31.Parent = player.Backpack
- local giveTool31 = ReplicatedStorage.Accessories:FindFirstChild("WoodenStaff"):Clone()
- giveTool31.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenStaff").Value = WoodenStaff.Name
- bool31.Value = true
- WoodenStaffifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < WoodenStaff.Price.Value and not WoodenStaffifsInInventory and bool31.Value == false then
- return "NotEnough"
- end
- if bool31.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenStaff").Value ~= WoodenStaff.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenStaff").Value = WoodenStaff.Name
- local giveTool31 = ReplicatedStorage.Accessories:FindFirstChild("WoodenStaff"):Clone()
- giveTool31.Parent = player.Backpack
- local giveTool31 = ReplicatedStorage.Accessories:FindFirstChild("WoodenStaff"):Clone()
- giveTool31.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenStaff").Value == WoodenStaff.Name and bool31.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedWoodenStaff").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("WoodenStaff") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("WoodenStaff"):Destroy()
- player.StarterGear:FindFirstChild("WoodenStaff"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory32.OnServerInvoke = function(player,Spray)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local SprayifsInInventory
- local bool32 = player.AccessoriesInventory:FindFirstChild("Spray")
- if player.Backpack:FindFirstChild("Spray") then
- SprayifsInInventory = true
- end
- if Spray then
- if Spray:FindFirstChild("Price") then
- if not SprayifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= Spray.Price.Value and bool32.Value == false then
- print(player.Name.." brought the Spray item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - Spray.Price.Value
- local giveTool32 = ReplicatedStorage.Accessories:FindFirstChild("Spray"):Clone()
- giveTool32.Parent = player.Backpack
- local giveTool32 = ReplicatedStorage.Accessories:FindFirstChild("Spray"):Clone()
- giveTool32.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpray").Value = Spray.Name
- bool32.Value = true
- SprayifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < Spray.Price.Value and not SprayifsInInventory and bool32.Value == false then
- return "NotEnough"
- end
- if bool32.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpray").Value ~= Spray.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpray").Value = Spray.Name
- local giveTool32 = ReplicatedStorage.Accessories:FindFirstChild("Spray"):Clone()
- giveTool32.Parent = player.Backpack
- local giveTool32 = ReplicatedStorage.Accessories:FindFirstChild("Spray"):Clone()
- giveTool32.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpray").Value == Spray.Name and bool32.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpray").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("Spray") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("Spray"):Destroy()
- player.StarterGear:FindFirstChild("Spray"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory33.OnServerInvoke = function(player,ClownBomb)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local ClownBombifsInInventory
- local bool33 = player.AccessoriesInventory:FindFirstChild("ClownBomb")
- if player.Backpack:FindFirstChild("ClownBomb") then
- ClownBombifsInInventory = true
- end
- if ClownBomb then
- if ClownBomb:FindFirstChild("Price") then
- if not ClownBombifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= ClownBomb.Price.Value and bool33.Value == false then
- print(player.Name.." brought the Clown Bomb item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - ClownBomb.Price.Value
- local giveTool33 = ReplicatedStorage.Accessories:FindFirstChild("ClownBomb"):Clone()
- giveTool33.Parent = player.Backpack
- local giveTool33 = ReplicatedStorage.Accessories:FindFirstChild("ClownBomb"):Clone()
- giveTool33.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedClownBomb").Value = ClownBomb.Name
- bool33.Value = true
- ClownBombifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < ClownBomb.Price.Value and not ClownBombifsInInventory and bool33.Value == false then
- return "NotEnough"
- end
- if bool33.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedClownBomb").Value ~= ClownBomb.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedClownBomb").Value = ClownBomb.Name
- local giveTool33 = ReplicatedStorage.Accessories:FindFirstChild("ClownBomb"):Clone()
- giveTool33.Parent = player.Backpack
- local giveTool33 = ReplicatedStorage.Accessories:FindFirstChild("ClownBomb"):Clone()
- giveTool33.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedClownBomb").Value == ClownBomb.Name and bool33.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedClownBomb").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("ClownBomb") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("ClownBomb"):Destroy()
- player.StarterGear:FindFirstChild("ClownBomb"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory34.OnServerInvoke = function(player,ChameleonPotion)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local ChameleonPotionifsInInventory
- local bool34 = player.AccessoriesInventory:FindFirstChild("ChameleonPotion")
- if player.Backpack:FindFirstChild("ChameleonPotion") then
- ChameleonPotionifsInInventory = true
- end
- if ChameleonPotion then
- if ChameleonPotion:FindFirstChild("Price") then
- if not ChameleonPotionifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= ChameleonPotion.Price.Value and bool34.Value == false then
- print(player.Name.." brought the Clown Bomb item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - ChameleonPotion.Price.Value
- local giveTool34 = ReplicatedStorage.Accessories:FindFirstChild("ChameleonPotion"):Clone()
- giveTool34.Parent = player.Backpack
- local giveTool34 = ReplicatedStorage.Accessories:FindFirstChild("ChameleonPotion"):Clone()
- giveTool34.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChameleonPotion").Value = ChameleonPotion.Name
- bool34.Value = true
- ChameleonPotionifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < ChameleonPotion.Price.Value and not ChameleonPotionifsInInventory and bool34.Value == false then
- return "NotEnough"
- end
- if bool34.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChameleonPotion").Value ~= ChameleonPotion.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChameleonPotion").Value = ChameleonPotion.Name
- local giveTool34 = ReplicatedStorage.Accessories:FindFirstChild("ChameleonPotion"):Clone()
- giveTool34.Parent = player.Backpack
- local giveTool34 = ReplicatedStorage.Accessories:FindFirstChild("ChameleonPotion"):Clone()
- giveTool34.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChameleonPotion").Value == ChameleonPotion.Name and bool34.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedChameleonPotion").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("ChameleonPotion") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("ChameleonPotion"):Destroy()
- player.StarterGear:FindFirstChild("ChameleonPotion"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
- game.ReplicatedStorage.Accessories.Events.GiveAccessory35.OnServerInvoke = function(player,SpyDrone)
- if debounce == true then
- debounce = false
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- local SpyDroneifsInInventory
- local bool35 = player.AccessoriesInventory:FindFirstChild("SpyDrone")
- if player.Backpack:FindFirstChild("SpyDrone") then
- SpyDroneifsInInventory = true
- end
- if SpyDrone then
- if SpyDrone:FindFirstChild("Price") then
- if not SpyDroneifsInInventory then
- -- Check if we can buy the Item
- if player.leaderstats.Coins.Value >= SpyDrone.Price.Value and bool35.Value == false then
- print(player.Name.." brought the Clown Bomb item")
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - SpyDrone.Price.Value
- local giveTool35 = ReplicatedStorage.Accessories:FindFirstChild("SpyDrone"):Clone()
- giveTool35.Parent = player.Backpack
- local giveTool35 = ReplicatedStorage.Accessories:FindFirstChild("SpyDrone"):Clone()
- giveTool35.Parent = player.StarterGear
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpyDrone").Value = SpyDrone.Name
- bool35.Value = true
- SpyDroneifsInInventory = true
- wait(.5)
- debounce = true
- return "Brought"
- end
- end
- end
- end
- if player.leaderstats.Coins.Value < SpyDrone.Price.Value and not SpyDroneifsInInventory and bool35.Value == false then
- return "NotEnough"
- end
- if bool35.Value == true then
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpyDrone").Value ~= SpyDrone.Name then
- -- You already owned it
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpyDrone").Value = SpyDrone.Name
- local giveTool35 = ReplicatedStorage.Accessories:FindFirstChild("SpyDrone"):Clone()
- giveTool35.Parent = player.Backpack
- local giveTool35 = ReplicatedStorage.Accessories:FindFirstChild("SpyDrone"):Clone()
- giveTool35.Parent = player.StarterGear
- wait(.1)
- debounce = true
- return "Equip"
- end
- end
- if player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpyDrone").Value == SpyDrone.Name and bool35.Value == true then
- player.AccessoriesInventory:FindFirstChild("EquippedAccessories"):FindFirstChild("EquippedSpyDrone").Value = ""
- humanoid:UnequipTools()
- if player.Backpack:FindFirstChild("SpyDrone") then
- if humanoid then
- humanoid:UnequipTools()
- player.Backpack:FindFirstChild("SpyDrone"):Destroy()
- player.StarterGear:FindFirstChild("SpyDrone"):Destroy()
- return "Unequip"
- end
- wait(.1)
- debounce = true
- return "Unequip"
- end
- end
- end
- wait(.5)
- debounce = true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement