No error messages in the output, but this GUI script will not work. Why? (Local Script)
Whenever I run this script and type in all the variables, the script breaks and doesn't output an error message. Any help or suggestions?
02 | lp = game.Players.LocalPlayer |
08 | [ "XtremeSpy" ] = workspace.ec.Value, |
09 | [ "Frosty" ] = workspace.fs.Value |
12 | function isPlayerAdmin(p) |
13 | for i,v in pairs (admins) do |
14 | if p.userId = = v or p.Name = = "Player1" then |
16 | elseif p:IsInGroup(groupid) and p:GetRankInGroup(groupid) > 11 then |
24 | function checkStat(stat) |
26 | "Kills" , "Deaths" , "Points" , "Demerits" , "Promotion" |
28 | local check = stat:lower() |
29 | for key,value in pairs (types) do |
30 | if value:sub( 1 ,check:len()):lower() = = check then |
39 | local p 1 = name:lower() |
40 | for i,v in pairs (game.Players:GetPlayers()) do |
41 | if string.sub(v.Name:lower(), 1 , string.len(p 1 )) = = p 1 then |
49 | submit.MouseButton 1 Down:connect( function () |
50 | if isPlayerAdmin(lp) = = true then |
51 | if string.len(value.Text) > 1 and string.len(stat.Text) > 1 and string.len(player.Text) > 1 then |
52 | if tonumber (value.Text) ~ = nil and checkStat(stat.Text)~ = false and getP(player.Text)~ = false then |
53 | local vlu = tonumber (value.Text):match( "%d+" ) |
54 | local sts = checkStat(stat.Text) |
55 | local plyr = getP(player.Text) |
56 | game.Players [ plyr ] .leaderstats [ sts ] .Value = vlu |
57 | elseif tonumber (value.Text) = = nil and checkStat(stat.Text)~ = false and getP(player.Text)~ = false then |
58 | if value.Text:lower() = = "yes" or value.Text:lower() = = "no" then |
61 | local plyr = getP(player.Text) |
62 | plyr.leaderstats [ sts ] .Value = vlu |