Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SurfaceGui2 = Instance.new("SurfaceGui")
- TextLabel3 = Instance.new("TextBox")
- TextLabel4 = Instance.new("TextBox")
- TextLabel5 = Instance.new("TextBox")
- TextLabel6 = Instance.new("TextBox")
- Tool0.Name = "Geiger Counter"
- Tool0.ToolTip = "Used for detecting radiation."
- Tool0.CanBeDropped = false
- Tool0.TextureId = "rbxassetid://198738758"
- Tool0.Parent = owner.Backpack
- Tool0.Grip = CFrame.new(0.643815994, 0.157236308, -0.489322126, -8.9397858e-09, -0.978862703, 0.204518422, -0.190851331, 0.200759158, 0.960870147, -0.981618941, -0.0390326045, -0.186817244)
- Tool0.GripForward = Vector3.new(-0.204518422, -0.960870147, 0.186817244)
- Tool0.GripPos = Vector3.new(0.643815994, 0.157236308, -0.489322126)
- Tool0.GripRight = Vector3.new(-8.9397858e-09, -0.190851331, -0.981618941)
- Tool0.GripUp = Vector3.new(-0.978862703, 0.200759158, -0.0390326045)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-24.1300011, 0.705003858, -7.67999935, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-24.1300011, 0.705003858, -7.67999935)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Size = Vector3.new(1.5, 0.5, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.CanCollide = false
- Part1.Material = Enum.Material.SmoothPlastic
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Dark stone grey")
- SurfaceGui2.Parent = Part1
- SurfaceGui2.Face = Enum.NormalId.Top
- SurfaceGui2.Adornee = Part1
- SurfaceGui2.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
- SurfaceGui2.PixelsPerStud = 75
- TextLabel3.Name = "title"
- TextLabel3.Parent = SurfaceGui2
- TextLabel3.Size = UDim2.new(1, 0, 0, 15)
- TextLabel3.BackgroundColor = BrickColor.new("White")
- TextLabel3.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
- TextLabel3.BackgroundTransparency = 1
- TextLabel3.BorderSizePixel = 0
- TextLabel3.Font = Enum.Font.ArialBold
- TextLabel3.Text = "Geiger RPS"
- TextLabel3.TextColor = BrickColor.new("Really black")
- TextLabel3.TextColor3 = Color3.new(0, 0, 0)
- TextLabel3.TextScaled = true
- TextLabel3.TextWrap = true
- TextLabel3.TextWrapped = true
- TextLabel4.Name = "meter"
- TextLabel4.Parent = SurfaceGui2
- TextLabel4.Position = UDim2.new(0, 0, 0.4, 0)
- TextLabel4.Size = UDim2.new(1, 0, 0, 30)
- TextLabel4.BackgroundColor = BrickColor.new("White")
- TextLabel4.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
- TextLabel4.BackgroundTransparency = 1
- TextLabel4.BorderSizePixel = 0
- TextLabel4.Font = Enum.Font.SciFi
- TextLabel4.Text = "0"
- TextLabel4.TextColor = BrickColor.new("Really black")
- TextLabel4.TextColor3 = Color3.new(0, 0, 0)
- TextLabel4.TextScaled = true
- TextLabel4.TextWrap = true
- TextLabel4.TextWrapped = true
- TextLabel5.Name = "player"
- TextLabel5.Parent = SurfaceGui2
- TextLabel5.Position = UDim2.new(0, 0, 0.2, 0)
- TextLabel5.Size = UDim2.new(1, 0, 0, 20)
- TextLabel5.BackgroundColor = BrickColor.new("White")
- TextLabel5.BackgroundColor3 = Color3.new(0.960784, 0.960784, 0.960784)
- TextLabel5.BackgroundTransparency = 1
- TextLabel5.BorderSizePixel = 0
- TextLabel5.Font = Enum.Font.Arial
- TextLabel5.Text = "NIL"
- TextLabel5.TextColor = BrickColor.new("Really black")
- TextLabel5.TextColor3 = Color3.new(0, 0, 0)
- TextLabel5.TextScaled = true
- TextLabel5.TextWrap = true
- TextLabel5.TextWrapped = true
- TextLabel6.Name = "status"
- TextLabel6.Parent = SurfaceGui2
- TextLabel6.Position = UDim2.new(0, 0, 0.75, 0)
- TextLabel6.Size = UDim2.new(1, 0, 0, 20)
- TextLabel6.BackgroundTransparency = 1
- TextLabel6.BorderSizePixel = 0
- TextLabel6.Font = Enum.Font.SciFi
- TextLabel6.Text = "OFF"
- TextLabel6.TextColor = BrickColor.new("Really red")
- TextLabel6.TextColor3 = Color3.new(1, 0, 0)
- TextLabel6.TextScaled = true
- TextLabel6.TextWrap = true
- TextLabel6.TextWrapped = true
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char['Torso'] or char['UpperTorso']
- local tool = Tool0
- local handle = Part1
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local using = false
- local equipped = false
- local activated = false
- local turnon = Instance.new("Sound",Part1)
- turnon.SoundId = "rbxassetid://15666462"
- turnon.EmitterSize = 1
- turnon.Volume = 5
- local counter = Instance.new("Sound",Part1)
- counter.Looped = true
- counter.SoundId = "rbxassetid://145214482"
- counter.EmitterSize = 1
- counter.Volume = 4
- local switch = Instance.new("Sound",Part1)
- switch.SoundId = "rbxassetid://190126363"
- switch.EmitterSize = 1
- switch.Volume = 5
- tool.Equipped:Connect(function()
- equipped = true
- turnon:Play()
- if activated then
- counter:Resume()
- end
- end)
- tool.Unequipped:Connect(function()
- equipped = false
- turnon:Stop()
- counter:Stop()
- switch:Stop()
- end)
- Tool0.Activated:Connect(function()
- switch:Play()
- if equipped then
- activated = not activated
- end
- if activated then
- counter:Play()
- TextLabel6.Text = "ON"
- TextLabel6.TextColor3 = Color3.new(44/255, 255/255, 12/255)
- elseif not activated then
- counter:Stop()
- TextLabel6.Text = "OFF"
- TextLabel6.TextColor3 = Color3.new(1, 0, 0)
- end
- end)
- function FindNearestHead(Position, Distance, SinglePlayer)
- if SinglePlayer then
- return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
- end
- local List = {}
- local closest = math.huge
- for i, v in pairs(workspace:GetChildren()) do
- if v:IsA("Model") then
- if v:FindFirstChild("Head") then
- local dist = (v.Head.Position - Position).Magnitude
- if (v.Head.Position - Position).Magnitude <= Distance then
- table.insert(List, dist, v)
- if closest > dist then
- closest = dist
- end
- end
- end
- end
- end
- return List
- end
- if not _G['rad_char_data'] then
- _G['rad_char_data'] = {}
- end
- while task.wait(1) do
- local data = _G['rad_char_data'] or {}
- if equipped and activated then
- local result = 0
- local infector = 'NIL'
- local list = FindNearestHead(torso.CFrame.Position,25)
- local tchar
- local pdata
- for i,v in pairs(list) do
- if data[v] and data[v].gy > 0.1 then
- tchar = v
- pdata = data[v]
- break
- end
- end
- local default_vol = 0.5
- local default_speed = 0.5
- local max_gy = 20
- if pdata then
- local gy = pdata.gy
- result = math.round(gy*10)/10
- infector = tchar.Name
- local max = 15
- counter.PlaybackSpeed = default_speed + math.clamp(gy/max,0,1)
- counter.Volume = default_vol + math.clamp(gy/max,0,1)
- else
- counter.PlaybackSpeed = default_speed
- counter.Volume = default_vol
- end
- if result > 0.1 then
- counter:Resume()
- if result > max_gy then
- result = max_gy .. "+"
- end
- TextLabel4.Text = result
- TextLabel5.Text = infector
- elseif 0 >= result then
- counter:Stop()
- TextLabel4.Text = "0"
- TextLabel5.Text = "NIL"
- end
- else
- TextLabel4.Text = "0"
- TextLabel5.Text = "NIL"
- counter:Stop()
- end
- end
Add Comment
Please, Sign In to add comment