Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local suffixes = {
- "K",
- "M",
- "B",
- "T",
- "Qa",
- "Qi",
- "Sx",
- "Sp",
- "Oc",
- "No",
- "Dc",
- "Ud",
- "Dd",
- "Td",
- "Qad"
- }
- function AddComas(n)
- local var
- for i = #suffixes, 1, -1 do
- local v = math.pow(10, i * 3)
- if n >= v then
- local var = ("%.3f"):format(n / v) .. suffixes[i]
- local num = tostring(string.match(var, "%d+"))
- local suffix = string.find(var, "%a+")
- local digit = #num
- if digit == 1 then
- return ("%.3f"):format(n / v) .. suffixes[i]
- elseif digit == 2 then
- return ("%.2f"):format(n / v) .. suffixes[i]
- elseif digit == 3 then
- return ("%.1f"):format(n / v) .. suffixes[i]
- end
- end
- end
- end
- local old = tick()
- local total = tick()
- local begin = game:GetService("Players").LocalPlayer.PrivateStats.BodyToughness.Value
- game:GetService("Players").LocalPlayer.PrivateStats.BodyToughness.Changed:connect(function(val)
- print(AddComas(val))
- print('time:'..tostring(tick()-old))
- print('total gained:'..tostring(AddComas(val-begin)))
- print('total time:'..tostring(tick()-total))
- old=tick()
- end)
- local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
- local get = setmetatable({},{
- __index = function(t,k)
- local str = string.lower(tostring(k));
- if str == "lplr" then
- return game:GetService("Players").LocalPlayer or nil;
- elseif str == "char" then
- return game:GetService("Players").LocalPlayer.Character or nil;
- else
- return game:GetService(tostring(k));
- end;
- end;
- });
- spawn(function()
- while wait(2) do
- if get.char and get.char:FindFirstChild('Humanoid') then
- local hp = game:GetService("Players").LocalPlayer.Character:FindFirstChild('Humanoid').Health or 0
- local maxhp = game:GetService("Players").LocalPlayer.Character:FindFirstChild('Humanoid').MaxHealth or 100
- if hp ~= maxhp then
- event:FireServer({"Respawn"})
- end
- end
- if not get.char then
- event:FireServer({"Respawn"})
- end
- end
- end)
- while wait() do
- if get.char and get.char:FindFirstChild('Humanoid') then
- get.char.HumanoidRootPart.CFrame = CFrame.new(-276, 281, 992)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement