Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ob = owner
- local players = game:GetService("Players")
- wait()
- print("Welcome "..ob.Name..".")
- print''
- function PrintCmds()
- print'Friendly Admin by CHL (SoftlockedUnderZero) '
- print'(Because you guys are gonna abuse regular admin) '
- print'https://pastebin.com/TgQRbKms '
- print' '
- print'Commands: '
- print'============== '
- print'/age <string: keyword: name ("all" works.)> '
- print'/credits '
- print'/cmds '
- print'/jumppower <string: keyword: name> <number (higher than 50, lower than 100)>'
- print'/maxhealth <string: keyword: name> <number (Higher than 0)> '
- print'/respawn [pos] '
- print'/speed <string: keyword: name> <number (higher than 16, lower than 100)> '
- print'/userid <string: keyword: name ("all" works.)> '
- end
- PrintCmds()
- ob.Chatted:Connect(function(msg)
- local len1 = string.len(msg)
- if string.sub( msg , 1,1)=="/" then
- if string.lower(string.sub(msg,2,5))=="age "then -- Account Age
- local tar = string.lower( string.sub (msg,6,len1) )
- if tar=="all" then
- for _,v in pairs(players:GetChildren())do
- print(v.Name.." is "..v.AccountAge.." days old.")
- end
- else
- for _,v in pairs(players:GetChildren())do
- if string.find(
- string.reverse(string.lower (v.Name)),
- string.reverse( tar ),
- string.len(v.Name) - string.len(tar)
- )
- then
- print(v.Name.." is "..v.AccountAge.." days old.")
- break
- end
- end
- end
- elseif string.lower(string.sub(msg,2,8))=="userid "then -- UserId
- local tar = string.lower( string.sub (msg,9,len1) )
- if tar=="all" then
- for _,v in pairs(players:GetChildren())do
- print(v.Name.."'s UserId is "..v.UserId)
- end
- else
- for _,v in pairs(players:GetChildren())do
- if string.find(
- string.reverse(string.lower (v.Name)),
- string.reverse( tar ),
- string.len(v.Name) - string.len(tar)
- )
- then
- print(v.Name.."'s UserId is "..v.UserId)
- break
- end
- end
- end
- elseif string.lower(string.sub(msg,2,8))=="credits"then -- Credits
- print'Friendly Admin by CHL (SoftlockedUnderZero)'
- elseif string.lower(string.sub(msg,2,7))=="speed "then -- Walkspeed
- local sep1 = string.find(
- string.lower(msg),
- " ",
- 8
- )
- local tar = nil
- local num = nil
- if sep1==nil then
- tar = string.lower( string.sub( msg , 8 , len1 ) )
- num = 16
- warn("Cannot find arguements. Default WalkSpeed is 16.")
- else
- tar = string.lower( string.sub( msg , 8 , sep1 - 1) )
- num = tonumber( string.lower( string.sub( msg , sep1 + 1 , len1) ) )
- if num==nil then
- num = 16
- warn("Speed must be a number.")
- end
- end
- if num<16 then
- num = 16
- warn("WalkSpeed can not go below than default.")
- end
- if num>100 then
- num = 100
- warn("WalkSpeed can not be too high.")
- end
- for _,v in pairs(players:GetChildren())do
- if string.find(
- string.reverse( string.lower(v.Name) ),
- string.reverse( tar ),
- string.len(v.Name) - string.len(tar)
- )
- then
- local vchar = v.Character
- if vchar then
- local vhum = vchar:FindFirstChildWhichIsA'Humanoid'
- if vhum then
- vhum.WalkSpeed = num
- print(v.Name.."'s WalkSpeed is now "..num.." studs per second.")
- else
- error("!Error! : Cannot find "..v.Name.."'s humanoid. Command Cancelled.")
- end
- else
- error("!Error! : Cannot find "..v.Name.."'s character. Command Cancelled.")
- end
- break
- end
- end
- elseif string.lower(string.sub(msg,2,11))=="jumppower "then -- Jumppower
- local sep1 = string.find(
- string.lower(msg),
- " ",
- 12
- )
- local tar = nil
- local num = nil
- if sep1==nil then
- tar = string.lower( string.sub( msg , 12 , len1 ) )
- num = 50
- warn("Cannot find arguements. Default JumpPower is 50.")
- else
- tar = string.lower( string.sub( msg , 12 , sep1 - 1) )
- num = tonumber( string.lower( string.sub( msg , sep1 + 1 , len1) ) )
- if num==nil then
- num = 50
- warn("JumpPower must be a number.")
- end
- end
- if num<50 then
- num = 50
- warn("JumpPower can not go below than default.")
- end
- if num>100 then
- num = 100
- warn("JumpPower can not be too high.")
- end
- for _,v in pairs(players:GetChildren())do
- if string.find(
- string.reverse( string.lower(v.Name) ),
- string.reverse( tar ),
- string.len(v.Name) - string.len(tar)
- )
- then
- local vchar = v.Character
- if vchar then
- local vhum = vchar:FindFirstChildWhichIsA'Humanoid'
- if vhum then
- vhum.JumpPower = num
- print(v.Name.."'s JumpPower is now "..num.." studs.")
- else
- error("!Error! : Cannot find "..v.Name.."'s humanoid. Command Cancelled.")
- end
- else
- error("!Error! : Cannot find "..v.Name.."'s character. Command Cancelled.")
- end
- break
- end
- end
- elseif string.lower(string.sub(msg,2,8))=="respawn"then -- Respawn
- if string.lower( string.sub(msg,9,12))==" pos" then
- local part = Instance.new("Part",workspace)
- part.CanCollide = false
- part.Anchored = true
- part.Transparency = 1
- if ob.Character~=nil then
- if ob.Character:FindFirstChild'HumanoidRootPart'~=nil then
- part.CFrame = ob.Character:FindFirstChild'HumanoidRootPart'.CFrame
- elseif ob.Character:FindFirstChild'Head'~=nil then
- part.CFrame = ob.Character:FindFirstChild'Head'.CFrame
- end
- end
- ob:LoadCharacter()
- wait(1/math.huge)
- ob.Character.HumanoidRootPart.CFrame = part.CFrame
- wait(1/math.huge)
- part:Destroy()
- else
- ob:LoadCharacter()
- end
- elseif string.lower(string.sub(msg,2,11))=="maxhealth "then -- MaxHealth
- local sep1 = string.find(
- string.lower(msg),
- " ",
- 12
- )
- local tar = nil
- local num = nil
- if sep1==nil then
- tar = string.lower( string.sub( msg , 12 , len1 ) )
- num = 100
- warn("Cannot find arguements. Default MaxHealth is 100.")
- else
- tar = string.lower( string.sub( msg , 12 , sep1 - 1) )
- num = tonumber( string.lower( string.sub( msg , sep1 + 1 , len1) ) )
- if num==nil then
- num = 100
- warn("MaxHealth must be a number.")
- end
- end
- if num<100 then
- num = 100
- warn("MaxHealth can not go below than default.")
- end
- for _,v in pairs(players:GetChildren())do
- if string.find(
- string.reverse( string.lower(v.Name) ),
- string.reverse( tar ),
- string.len(v.Name) - string.len(tar)
- )
- then
- local vchar = v.Character
- if vchar then
- local vhum = vchar:FindFirstChildWhichIsA'Humanoid'
- if vhum then
- vhum.MaxHealth = num
- vhum.Health = vhum.MaxHealth
- print(v.Name.."'s MaxHealth is now "..num)
- else
- error("!Error! : Cannot find "..v.Name.."'s humanoid. Command Cancelled.")
- end
- else
- error("!Error! : Cannot find "..v.Name.."'s character. Command Cancelled.")
- end
- break
- end
- end
- elseif string.lower(string.sub(msg,2,5))=="cmds"then -- CommandList
- PrintCmds()
- elseif string.lower(string.sub(msg,2,5))=="get "then
- if string.lower(string.sub(msg,6,15))=="accessory "then
- local sep1 = string.find(msg," ",16)
- local id = nil
- local name = nil
- if sep1==nil then
- else
- name = string.lower(string.sub(msg,16,sep1 - 1))
- id = tonumber(string.sub(msg,sep1 +1,len1))
- end
- local ips = game:GetService'InsertService'
- local acc = ips:LoadAsset(id)
- if id~=nil and acc~=nil then
- for _,v in pairs(game:GetService'Players':GetChildren())do
- if string.find(
- string.reverse(string.lower(v.Name)),
- string.reverse(name),
- string.len(v.Name) - string.len(name)
- )then
- acc = acc:GetChildren()[1]
- acc.Parent = v.Character
- break
- end
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement