Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SynapseX Decompiler
- local Player = game.Players.LocalPlayer
- local Stat = Player:WaitForChild("PlayerDataModels").Database
- Allowed = false
- if not Player:WaitForChild("Backpack"):FindFirstChild("Firearm License") then
- Allowed = false
- script.Parent.Buy.TextLabel.Text = "You do not own a license, which means you cannot buy a firearm"
- script.Parent.Buy.TextLabel.TextColor3 = Color3.new(170, 0, 0)
- script.Parent.Buy.ScrollingFrame.e.Visible = true
- script.Parent.Buy.ScrollingFrame.Glock.Selectable = false
- script.Parent.Buy.ScrollingFrame.Glock.buttonimage.ImageColor3 = Color3.fromRGB(66, 66, 66)
- script.Parent.Buy.ScrollingFrame.Astra.Selectable = false
- script.Parent.Buy.ScrollingFrame.Astra.buttonimage.ImageColor3 = Color3.fromRGB(66, 66, 66)
- script.Parent.Buy.ScrollingFrame.Ruger.Selectable = false
- script.Parent.Buy.ScrollingFrame.Ruger.buttonimage.ImageColor3 = Color3.fromRGB(66, 66, 66)
- else
- Allowed = true
- script.Parent.Buy.TextLabel.TextColor3 = Color3.new(255, 255, 255)
- script.Parent.Buy.TextLabel.Text = "You own a firearms license, which means you can buy a firearm"
- end
- script.Parent.Buy.ScrollingFrame.Deagle.MouseButton1Click:Connect(function()
- if Allowed == true then
- script.Parent.Sound:Play()
- game.ReplicatedStorage.ShopEvents.BuyWeapon:FireServer("Deagle")
- else
- script.Parent.no:Play()
- end
- end)
- script.Parent.Buy.ScrollingFrame.Ruger.MouseButton1Click:Connect(function()
- if Allowed == true then
- script.Parent.Sound:Play()
- game.ReplicatedStorage.ShopEvents.BuyWeapon:FireServer("Ruger")
- else
- script.Parent.no:Play()
- end
- end)
- script.Parent.Buy.ScrollingFrame.Makarov.MouseButton1Click:Connect(function()
- if Allowed == true then
- script.Parent.Sound:Play()
- game.ReplicatedStorage.ShopEvents.BuyWeapon:FireServer("Makarov")
- else
- script.Parent.no:Play()
- end
- end)
- script.Parent.Buy.Exit.MouseButton1Click:Connect(function()
- script.Parent.RemoteEvent:FireServer()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement