Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local WeaponsEvent = game.ReplicatedStorage.BuyEvents
- local WeaponsFrame = script.Parent.WeaponsFrame
- local player = game.Players.LocalPlayer
- local GamepassId = 196525745
- WeaponsFrame.Exit.MouseButton1Click:Connect(function()
- WeaponsFrame:TweenPosition(UDim2.new(0.5,0,-1,0),.1)
- end)
- WeaponsFrame.BatButton.MouseButton1Click:Connect(function()
- WeaponsEvent.BatEvent:FireServer(player)
- player.Backpack:ClearAllChildren()
- end)
- WeaponsFrame.PremiumButton.MouseButton1Click:Connect(function()
- if player.MembershipType == Enum.MembershipType.Premium then
- WeaponsEvent.PremiumEvent:FireServer(player)
- player.Backpack:ClearAllChildren()
- end
- end)
- WeaponsFrame.DemonSwordButton.MouseButton1Click:Connect(function()
- if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, GamepassId) then
- WeaponsEvent.DemonSword:FireServer(player)
- player.Backpack:ClearAllChildren()
- elseif player.Coins.Value >= 100 then
- player.Coins.Value = player.Coins.Value - 100
- WeaponsEvent.DemonSword:FireServer(player)
- player.Backpack:ClearAllChildren()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement