Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Type Gui Script
- local function AnimateText(Text)
- for i = 1, #Text, 1 do
- script.Parent.TextLabel.Text = string.sub(Text,1,i)
- wait(0.03)
- end
- end
- while true do
- AnimateText("👋 Welcome To The Game!")--Text Here
- wait(4)
- AnimateText("💰 Use The Shop To Buy Tools")--Text Here
- wait(4)
- AnimateText("👍 Make Sure To Like The Game")--Text Here
- wait(4)
- end
- --PurchaseScript
- local MarketplaceService = game:GetService("MarketplaceService")
- local Player = game.Players.LocalPlayer
- for i,Button in pairs(script.Parent:GetChildren()) do
- if Button:IsA("ImageButton") or Button:IsA("TextButton") then
- Button.MouseButton1Click:Connect(function()
- local GamepassId = Button:FindFirstChild("GamepassId")
- MarketplaceService:PromptGamePassPurchase(Player, GamepassId.Value)
- end)
- end
- end
- --ExitScript
- local ExitEvent = game.ReplicatedStorage.ExitEvent
- local Player = game.Players.LocalPlayer
- ExitEvent.OnClientEvent:Connect(function()
- Player.PlayerGui:WaitForChild("ExitGui").ExitButton.Visible = true
- end)
- Player.PlayerGui:WaitForChild("ExitGui").ExitButton.MouseButton1Click:Connect(function()
- ExitEvent:FireServer()
- Player.PlayerGui:WaitForChild("ExitGui").ExitButton.Visible = false
- end)
- --TransitionScript
- local TweenService = game:GetService("TweenService")
- local TransitionEvent = game.ReplicatedStorage.TransitionEvent
- local Player = game.Players.LocalPlayer
- local TransitionGui = Player.PlayerGui:WaitForChild("TransitionGui")
- local Frame = TransitionGui:WaitForChild("Frame")
- TransitionEvent.OnClientEvent:Connect(function()
- local FrameVisible = {}
- FrameVisible.BackgroundTransparency = 0
- local Info = TweenInfo.new(1)
- TweenService:Create(Frame, Info, FrameVisible):Play()
- end)
- --serverscriptservice
- local MarketplaceService = game:GetService("MarketplaceService")
- local GamepassTools = game.ReplicatedStorage:FindFirstChild("GampassTools")
- local function GiveTool(Player,Id,Tool)
- if MarketplaceService:UserOwnsGamePassAsync(Player.UserId,Id) then
- Tool:Clone().Parent = Player.Backpack
- Tool:Clone().Parent = Player.StarterGear
- end
- end
- game.Players.PlayerAdded:Connect(function(Player)
- GiveTool(Player,22972347,GamepassTools.Flashlight)
- GiveTool(Player,22972502,GamepassTools.Medkit)
- GiveTool(Player,22972549,GamepassTools.SpeedCoil)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement