Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mas = script
- Part0 = Instance.new("Part")
- Part1 = Instance.new("Part")
- Part2 = Instance.new("Part")
- Part0.Parent = mas
- Part0.CFrame = CFrame.new(-13.1700001, 3.50000381, 20.1999989, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(-13.170000076294, 3.5000038146973, 20.199998855591)
- Part0.Size = Vector3.new(2, 7, 13)
- Part0.Anchored = true
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.Material = Enum.Material.DiamondPlate
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part1.Parent = mas
- Part1.CFrame = CFrame.new(-20.1700001, 3.50000381, 14.6999989, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-20.170000076294, 3.5000038146973, 14.699998855591)
- Part1.Size = Vector3.new(16, 7, 2)
- Part1.Anchored = true
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Material = Enum.Material.DiamondPlate
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part2.Parent = mas
- Part2.Name = 'uranium'
- Part2.CFrame = CFrame.new(-21.0336342, 0.124483503, 21.6262875, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.Position = Vector3.new(-21.033634185791, 0.12448350340128, 21.626287460327)
- Part2.Color = Color3.new(0, 1, 0)
- Part2.Size = Vector3.new(7.7983164787292, 0.24896498024464, 6.8297309875488)
- Part2.Anchored = true
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Lime green")
- Part2.CanCollide = false
- Part2.Material = Enum.Material.Neon
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.brickColor = BrickColor.new("Lime green")
- for i,v in pairs(mas:GetChildren()) do
- v.CFrame = v.CFrame*CFrame.new(-10,0,0)
- end
- local doses = {
- fatal = 10,
- stage2 = 6,
- stage1 = 2,
- normal = 1,
- }
- local gy_per_rad = 0.01
- if not _G['rad_char_data'] then
- _G['rad_char_data'] = {}
- end
- local data = _G['rad_char_data'] or {}
- local rads = {}
- local pukes = {1067194716,1067195344,1067195040}
- function get_gy(n)
- return n*gy_per_rad
- end
- for i,v in pairs(script:GetChildren()) do
- if v.Name == 'uranium' then
- table.insert(rads,1,v)
- end
- end
- function raycast(Pos, Dir, Max, Ignore)
- local rayparams = RaycastParams.new()
- rayparams.FilterType = Enum.RaycastFilterType.Blacklist
- rayparams.FilterDescendantsInstances = Ignore
- rayparams.IgnoreWater = true
- return workspace:Raycast(Pos, Dir * (Max or 999.999), rayparams)
- end
- local st = os.clock()
- game:GetService("RunService").Stepped:Connect(function()
- local delta = os.clock()-st
- st = os.clock()
- local ignore = {
- unpack(rads)
- }
- for _,con in pairs(rads) do
- for _,char in pairs(workspace:GetChildren()) do
- if char then
- if not data[char] then
- data[char] = {
- gy = 0,
- last_check = 0,
- }
- end
- local root = char:FindFirstChild("HumanoidRootPart")
- local hum = char:FindFirstChildOfClass("Humanoid")
- if root and hum then else continue end
- local cdata = data[char]
- if cdata and hum and hum.Health > 0 and root then
- local pos = con.Position+Vector3.new(0,1,0)
- local dir = (root.Position-pos).Unit
- local result = raycast(pos,dir,nil,ignore)
- if result then
- local obj,hitpos = result.Instance,result.Position
- if obj and obj:IsDescendantOf(char) then
- local dist = (hitpos-pos).Magnitude
- data[char].gy += get_gy(25)/(dist^2)
- data[char].gy *= 1+(delta/10)/(dist^2)
- elseif data[char].gy > 0 then
- if data[char].gy > 5 then
- data[char].gy -= get_gy(10)*delta
- data[char].gy -= data[char].gy*(delta/20)
- else
- data[char].gy -= get_gy(5)*delta
- data[char].gy -= data[char].gy*(delta/20)
- end
- end
- end
- if 0 > data[char].gy then
- data[char].gy = 0
- end
- local dmg = cdata.gy/150
- if cdata.gy >= doses.normal then
- hum:TakeDamage(dmg)
- end
- if cdata.gy >= doses.stage2 and os.clock()-cdata.last_check >= 10 then
- data[char].last_check = os.clock()
- local s = Instance.new("Sound")
- s.SoundId = 'rbxassetid://' .. pukes[math.random(#pukes)]
- s.Volume = 0.5
- s.Parent = root
- s:Play()
- game:GetService("Debris"):AddItem(s,3)
- elseif cdata.gy >= doses.stage1 and doses.stage2 > cdata.gy and os.clock()-cdata.last_check >= 5 then
- data[char].last_check = os.clock()
- local s = Instance.new("Sound")
- s.SoundId = 'rbxassetid://328460122'
- s.Volume = 0.5
- s.Parent = root
- s:Play()
- game:GetService("Debris"):AddItem(s,3)
- end
- end
- end
- end
- end
- if not _G['rad_char_data'] then
- _G['rad_char_data'] = {}
- end
- for i,v in pairs(data) do
- _G['rad_char_data'][i] = v
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement