SHOW:
|
|
- or go back to the newest paste.
1 | Shop Or Other Stuff Can Be Used : | |
2 | ||
3 | ||
4 | script.Parent.MouseButton1Click:Connect(function() | |
5 | if script.Parent.Parent.Open.Value == false then | |
6 | script.Parent.Parent.Open.Value = true | |
7 | script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.5, -200, 0.5, -150),"Out","Quint",1,true) | |
8 | else | |
9 | script.Parent.Parent.Open.Value = false | |
10 | script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.5, -200, -0.5, -150),"Out","Quint",1,true) | |
11 | end | |
12 | end) | |
13 | --------------------------------------------------------------------------------------------------------------------------------------- | |
14 | Close Button : | |
15 | ||
16 | script.Parent.MouseButton1Click:Connect(function() | |
17 | script.Parent.Parent.Parent.Open.Value = false | |
18 | script.Parent.Parent:TweenPosition(UDim2.new(0.5, -200, -0.5, -150),"Out","Quint",1,true) | |
19 | end) | |
20 | --------------------------------------------------------------------------------------------------------------------------------------- | |
21 | Close Button2 : | |
22 | ||
23 | ||
24 | script.Parent.MouseButton1Click:connect(function() | |
25 | script.Parent.Parent:TweenPosition(UDim2.new(0.35,0,-10,0)) | |
26 | wait(1) | |
27 | script.Parent.Parent.Parent:Destroy() | |
28 | end) | |
29 | --------------------------------------------------------------------------------------------------------------------------------------- | |
30 | Team Only Items: | |
31 | ||
32 | ||
33 | --Just put weapons in the team. | |
34 | function teamFromColor(color) | |
35 | for _,t in pairs(game:GetService("Teams"):GetChildren()) do | |
36 | if t.TeamColor==color then return t end | |
37 | end | |
38 | return nil | |
39 | end | |
40 | ||
41 | function onSpawned(plr) | |
42 | local tools = teamFromColor(plr.TeamColor):GetChildren() | |
43 | for _,c in pairs(tools) do | |
44 | c:Clone().Parent = plr.Backpack | |
45 | end | |
46 | end | |
47 | ||
48 | function onChanged(prop,plr) | |
49 | if prop=="Character" then | |
50 | onSpawned(plr) | |
51 | end | |
52 | end | |
53 | ||
54 | function onAdded(plr) | |
55 | plr.Changed:connect(function(prop) | |
56 | onChanged(prop,plr) | |
57 | end) | |
58 | end | |
59 | ||
60 | game.Players.PlayerAdded:connect(onAdded) | |
61 | --------------------------------------------------------------------------------------------------------------------------------------- | |
62 | LeaderBoard For Gamepass Put In ServerScriptService: | |
63 | ||
64 | ||
65 | game.Players.PlayerAdded:connect(function(plr) | |
66 | local folder = Instance.new("Folder", plr) | |
67 | folder.Name = "leaderstats" | |
68 | local value = Instance.new("IntValue", folder) | |
69 | value.Name = "Cash" | |
70 | value.Value = 0 -- starting cash | |
71 | end) | |
72 | --------------------------------------------------------------------------------------------------------------------------------------- | |
73 | Main Script For Gamepass Put In ServerScriptService: | |
74 | ||
75 | ||
76 | local MPS = game:GetService("MarketplaceService") | |
77 | ||
78 | MPS.ProcessReceipt = function(receiptInfo) | |
79 | if receiptInfo.ProductId == 000000000 then -- replace with your ID here | |
80 | local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId) | |
81 | player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000 | |
82 | return Enum.ProductPurchaseDecision.PurchaseGranted | |
83 | --------------------------------------------------------------------------------------------------------------------------------------- | |
84 | Local Script For Gamepass Put In StarterGui Into Button: | |
85 | ||
86 | ||
87 | MPS = game:GetService("MarketplaceService") | |
88 | id = 000000000 -- replace with your ID | |
89 | local player = game.Players.LocalPlayer | |
90 | ||
91 | script.Parent.MouseButton1Click:connect(function() | |
92 | MPS:PromptProductPurchase(player, id) | |
93 | end) | |
94 | --------------------------------------------------------------------------------------------------------------------------------------- | |
95 | Put In TextBox For CodeGui: | |
96 | ||
97 | ||
98 | local code2 = "CodeHere" | |
99 | local p = script.Parent.Parent.Parent.Parent.Parent | |
100 | script.Parent.Parent.GO.MouseButton1Click:connect(function() | |
101 | if script.Parent.Text:lower() == code2:lower() then | |
102 | if p:FindFirstChild('Code'..code2) then | |
103 | script.Parent.Text = "Already Used!" | |
104 | else | |
105 | Instance.new('Model', p).Name = ("Code"..code2) | |
106 | script.Parent.Text = "Redeemed!" | |
107 | local TOOLNAMEHERE = game.ReplicatedStorage:WaitForChild("TOOLNAMEHERE"); | |
108 | TOOLNAMEHERE:Clone().Parent = game.Players.LocalPlayer.StarterGear | |
109 | TOOLNAMEHERE:Clone().Parent = game.Players.LocalPlayer.Backpack | |
110 | end | |
111 | end | |
112 | end) | |
113 | --------------------------------------------------------------------------------------------------------------------------------------- | |
114 | Can Be Used By Shop Or Other Stuff: | |
115 | ||
116 | ||
117 | script.Parent.MouseButton1Down:connect(function() | |
118 | if script.Parent.Parent.Frame.Visible == false then | |
119 | script.Parent.Parent.Frame.Visible = true | |
120 | script.Parent.Text = "Close" | |
121 | else | |
122 | script.Parent.Parent.Frame.Visible = false | |
123 | script.Parent.Text = "Open" | |
124 | end | |
125 | end) | |
126 | --------------------------------------------------------------------------------------------------------------------------------------- | |
127 | Superspeed For Gamepass Put In ServerScriptService: | |
128 | ||
129 | ||
130 | ||
131 | local id = ID | |
132 | ||
133 | game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) | |
134 | if purchased and ido == id then | |
135 | plr.Character.Humanoid.WalkSpeed = 30 | |
136 | end | |
137 | end) | |
138 | ||
139 | game.Players.PlayerAdded:Connect(function(plr) | |
140 | plr.CharacterAdded:connect(function(char) | |
141 | if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then | |
142 | char.Humanoid.WalkSpeed = 30 | |
143 | end | |
144 | end) | |
145 | end) |