Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findplayer(playername)
- plrlen = string.len(playername)
- Current_Players = game.Players:GetChildren()
- for i=1,#Current_Players do
- plr = Current_Players[i]
- if plr.Name:sub(1,plrlen):lower() == playername:lower() then
- return Current_Players[i]
- end
- end
- end
- function round(number)
- kek = nil
- local strnum = tostring(number)
- for i=1,#strnum do
- if string.sub(strnum,i,i) == "." then
- kek = tonumber(string.sub(strnum,i+1,i+1))
- kek2 = tonumber(string.sub(strnum,1,i-1))
- end
- end
- if kek ~= nil then
- if kek >= 5 then
- kek2 = kek2 + 1
- else
- kek2 = kek2
- end
- end
- return kek2
- end
- for i,v in pairs(game.Players:GetChildren()) do
- v.Chatted:Connect(function(msg)
- if msg:sub(1,5):lower() == ";age " then
- player_name = findplayer(msg:sub(6))
- if workspace:FindFirstChild("Hint") ~= nil then
- workspace:FindFirstChild("Hint"):Destroy()
- end
- g = Instance.new("Hint",workspace)
- j = round(player_name.AccountAge/365)
- g.Text = tostring(player_name).."'s age is : "..player_name.AccountAge.." | "..j.." years!"
- elseif msg:sub(1,6):lower() == ";ball " then
- local num;
- for i=7,#msg do
- if msg:sub(i,i) == " " then
- num = i
- end
- end
- player = findplayer(msg:sub(7,num-1))
- dia = tonumber(msg:sub(num+1))
- local par = Instance.new("Part",workspace)
- local wel = Instance.new("Weld",workspace)
- par.Shape = "Ball"
- par.Material = "Neon"
- par.Transparency = 0.5
- if player.Character:FindFirstChild("UpperTorso") then
- Torso = player.Character:FindFirstChild("UpperTorso")
- else
- Torso = player.Character:FindFirstChild("Torso")
- end
- par.CFrame = Torso.CFrame
- par.Size = Vector3.new(dia,dia,dia)
- wel.Part0 = Torso
- wel.Part1 = par
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement