gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 02:33 PM |
game:GetService("Players").PlayerAdded:connect(function(Player) Player:WaitForDataReady() local Key,Error = pcall(function() return Player:LoadNumber("Pin") end) end)
game:GetService("Players").PlayerAdded:connect(function(Player) Player.Pin.Changed:connect(function() Player:SaveNumber("Pin", Player.Pin.Value) end) end)
--The number doesn't save/load
local mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if reg.User.Active == true and key:byte() == 13 then b=plr.Pin b.Value = reg.User.Text reg.Visible = false start.Visible = true end end) --It doesn't make start visible |
|
|
| Report Abuse |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 02:44 PM |
Bump... OutPut for Data persistence:
Pin is not a valid member of player |
|
|
| Report Abuse |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 03:11 PM |
Here is the full version of the 2nd script:
local plr = game.Players.LocalPlayer gui = plr.PlayerGui.Pass start = gui.Start ar = gui.ar reg = gui.Reg bay = gui.bay te = gui.Fra arr = gui.arr w = plr.Correct ---------------- start.reg.MouseButton1Down:connect(function() if plr.Pin.Value == 0 then start.Visible = false ar.Visible = true else bay.Visible = true start.Visible = false end end)
ar.No.MouseButton1Down:connect(function() ar.Visible = false start.Visible = true end)
ar.Yes.MouseButton1Down:connect(function() if start.reg.Selected == true then reg.Visible = true ar.Visible = false reg.User.Active = true end end)
bay.Go.MouseButton1Down:connect(function() start.Visible=true bay.Visible=false end)
local mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if reg.User.Active == true and key:byte() == 13 then b=plr.Pin b.Value = reg.User.Text reg.Visible = false start.Visible = true reg.User.Active = false end end)
start.log.MouseButton1Down:connect(function() if plr.Pin == 0 then arr.Visible = true start.Visible = false else te.Visible = true start.Visible = false te.T.Active = true end end)
mouse.KeyDown:connect(function(key)
b = plr.Pin
if te.T.Active == true and key:byte() == 13 then w.Value = te.T.Text if te.T.Active == true and w.Value == b.Value and key:byte() == 13 then gui:Destroy() elseif key:byte() == 13 and te.T.Active == true and b.Value > w.Value or b.Value < w.Value and te:FindFirstChild("WW") == nil then s = Instance.new("TextLabel", te) s.Name = "WW" s.TextColor3 = Color3.new(1,1,1) s:TweenPosition(UDim2.new(0, 160, 0, 100),"In", "Quad", 3, true)--Tweeing s:TweenSize(UDim2.new(0, 200, 0, 20), "In", "Quad", 3, true) --Tweening s.BackgroundColor3 = Color3.new(206/206,0/0,0/0) s.Text = "Error: Wrong Pin" s.Font = "ArialBold" s.FontSize="Size24" elseif key:byte() == 13 and te.T.Active == true and b.Value > w.Value or b.Value < w.Value and te:FindFirstChild("WW") then s = te.WW s:Destroy() wait(.1) r = Instance.new("TextLabel", te) r.Name = "WW" r.TextColor3 = Color3.new(1,1,1) r:TweenPosition(UDim2.new(0, 160, 0, 100),"In", "Quad", 3, true)--Tweeing r:TweenSize(UDim2.new(0, 200, 0, 20), "In", "Quad", 3, true) --Tweening r.BackgroundColor3 = Color3.new(206/206,0/0,0/0) r.Text = "Error: Wrong Pin" r.Font = "ArialBold" r.FontSize="Size24" end end end)
--It only works completely in solo... |
|
|
| Report Abuse |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
| 22 Apr 2013 04:57 PM |
| Bump (Why am I bumping this?) |
|
|
| Report Abuse |
|