Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.MouseButton1Click:Connect(function()
- if script.Parent.Parent.Open.Value == false then
- script.Parent.Parent.Open.Value = true
- script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.5, -200, 0.5, -150),"Out","Quint",1,true)
- else
- script.Parent.Parent.Open.Value = false
- script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.5, -200, -0.5, -150),"Out","Quint",1,true)
- end
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Close Button :
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Parent.Open.Value = false
- script.Parent.Parent:TweenPosition(UDim2.new(0.5, -200, -0.5, -150),"Out","Quint",1,true)
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Close Button2 :
- script.Parent.MouseButton1Click:connect(function()
- script.Parent.Parent:TweenPosition(UDim2.new(0.35,0,-10,0))
- wait(1)
- script.Parent.Parent.Parent:Destroy()
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Team Only Items:
- --Just put weapons in the team.
- function teamFromColor(color)
- for _,t in pairs(game:GetService("Teams"):GetChildren()) do
- if t.TeamColor==color then return t end
- end
- return nil
- end
- function onSpawned(plr)
- local tools = teamFromColor(plr.TeamColor):GetChildren()
- for _,c in pairs(tools) do
- c:Clone().Parent = plr.Backpack
- end
- end
- function onChanged(prop,plr)
- if prop=="Character" then
- onSpawned(plr)
- end
- end
- function onAdded(plr)
- plr.Changed:connect(function(prop)
- onChanged(prop,plr)
- end)
- end
- game.Players.PlayerAdded:connect(onAdded)
- ---------------------------------------------------------------------------------------------------------------------------------------
- LeaderBoard For Gamepass Put In ServerScriptService:
- game.Players.PlayerAdded:connect(function(plr)
- local folder = Instance.new("Folder", plr)
- folder.Name = "leaderstats"
- local value = Instance.new("IntValue", folder)
- value.Name = "Cash"
- value.Value = 0 -- starting cash
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Main Script For Gamepass Put In ServerScriptService:
- local MPS = game:GetService("MarketplaceService")
- MPS.ProcessReceipt = function(receiptInfo)
- if receiptInfo.ProductId == 000000000 then -- replace with your ID here
- local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
- player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000
- return Enum.ProductPurchaseDecision.PurchaseGranted
- ---------------------------------------------------------------------------------------------------------------------------------------
- Local Script For Gamepass Put In StarterGui Into Button:
- MPS = game:GetService("MarketplaceService")
- id = 000000000 -- replace with your ID
- local player = game.Players.LocalPlayer
- script.Parent.MouseButton1Click:connect(function()
- MPS:PromptProductPurchase(player, id)
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Put In TextBox For CodeGui:
- local code2 = "CodeHere"
- local p = script.Parent.Parent.Parent.Parent.Parent
- script.Parent.Parent.GO.MouseButton1Click:connect(function()
- if script.Parent.Text:lower() == code2:lower() then
- if p:FindFirstChild('Code'..code2) then
- script.Parent.Text = "Already Used!"
- else
- Instance.new('Model', p).Name = ("Code"..code2)
- script.Parent.Text = "Redeemed!"
- local TOOLNAMEHERE = game.ReplicatedStorage:WaitForChild("TOOLNAMEHERE");
- TOOLNAMEHERE:Clone().Parent = game.Players.LocalPlayer.StarterGear
- TOOLNAMEHERE:Clone().Parent = game.Players.LocalPlayer.Backpack
- end
- end
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Can Be Used By Shop Or Other Stuff:
- script.Parent.MouseButton1Down:connect(function()
- if script.Parent.Parent.Frame.Visible == false then
- script.Parent.Parent.Frame.Visible = true
- script.Parent.Text = "Close"
- else
- script.Parent.Parent.Frame.Visible = false
- script.Parent.Text = "Open"
- end
- end)
- ---------------------------------------------------------------------------------------------------------------------------------------
- Superspeed For Gamepass Put In ServerScriptService:
- local id = ID
- game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
- if purchased and ido == id then
- plr.Character.Humanoid.WalkSpeed = 30
- end
- end)
- game.Players.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:connect(function(char)
- if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
- char.Humanoid.WalkSpeed = 30
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement