Advertisement
Guest User

Roblox Script1 Copy5

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