Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local root = char:FindFirstChild("HumanoidRootPart")
- local base,center,spinner
- local bg,score_g,speed_g
- local base_speed = 0.8
- local speed = base_speed
- local increment_speed = 0.025
- local extra_speed = 0.005
- local max_speed = 3
- local size = 60
- local base_damage = 5
- local score = 0
- local increment_score = 10
- local damage = base_damage
- local playing = false
- local part_folder = Instance.new("Folder")
- function connect_touch(p)
- p.Touched:Connect(function(obj)
- local char,torso,hum
- char = obj.Parent
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- if char and torso and hum and hum.Health > 0 and not hum:FindFirstChild("confirm hurt obsticle") then
- local c = Instance.new("ObjectValue")
- c.Name = "confirm hurt obsticle"
- c.Parent = hum
- game:GetService("Debris"):AddItem(c,0.5)
- hum:TakeDamage(damage)
- end
- end)
- end
- function connect_spin(p)
- local n = 0
- local spin_s = Instance.new("Sound")
- spin_s.SoundId = 'rbxassetid://1516340324'
- spin_s.Volume = (speed/max_speed)*7
- spin_s.PlaybackSpeed = (speed/max_speed)*4
- spin_s.Looped = true
- spin_s.Parent = p
- spin_s:Play()
- while playing do
- n += speed
- if n >= 180 then
- n = 0
- score += increment_score
- if speed >= max_speed then
- speed += extra_speed
- else
- speed += increment_speed
- end
- local _speed = math.clamp(speed,base_speed,max_speed)/max_speed
- if _speed*100 >= 100 and not spinner:FindFirstChild("Fire") then
- local pct = Instance.new("ParticleEmitter")
- pct.LockedToPart = true
- pct.Name = 'Fire'
- pct.Parent = spinner
- pct.Speed = NumberRange.new(2, 2)
- pct.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(1, 1, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0)),
- })
- pct.LightEmission = 0.2
- pct.LightInfluence = 1
- pct.Texture = "rbxasset://textures/particles/smoke_main.dds"
- pct.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0,1),
- NumberSequenceKeypoint.new(0.0643,0.22499996423721),
- NumberSequenceKeypoint.new(0.814,0.33125001192093),
- NumberSequenceKeypoint.new(1,1),
- })
- pct.Size = NumberSequence.new(1,0)
- pct.Lifetime = NumberRange.new(1.5, 1.5)
- pct.Rate = 1000
- pct.RotSpeed = NumberRange.new(20, 20)
- end
- damage = _speed*100
- spinner.Color = Color3.new(_speed,0,1-_speed)
- spin_s.Volume =_speed*7
- spin_s.PlaybackSpeed = _speed*4
- score_g.Text = tostring(score)
- speed_g.Text = tostring(((speed/max_speed)-(speed/max_speed)%0.0001)*100 .. '%')
- end
- p.CFrame = p.CFrame*CFrame.Angles(math.rad(speed),math.rad(0),math.rad(0))
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- function make_gui(p)
- bg = Instance.new("BillboardGui")
- score_g = Instance.new("TextBox")
- speed_g = Instance.new("TextBox")
- bg.Parent = p
- bg.LightInfluence = 1
- bg.Size = UDim2.new(15, 0, 5, 0)
- bg.Active = true
- bg.ClipsDescendants = true
- bg.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- bg.SizeOffset = Vector2.new(0, 1)
- score_g.Name = "score"
- score_g.Parent = bg
- score_g.Size = UDim2.new(1, 0, 0.5, 0)
- score_g.BackgroundColor = BrickColor.new("Dark taupe")
- score_g.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
- score_g.Font = Enum.Font.SourceSans
- score_g.FontSize = Enum.FontSize.Size14
- score_g.Text = "Score: N/A"
- score_g.TextColor = BrickColor.new("Institutional white")
- score_g.TextColor3 = Color3.new(1, 1, 1)
- score_g.TextScaled = true
- score_g.TextSize = 14
- score_g.TextStrokeTransparency = 0
- score_g.TextWrap = true
- score_g.TextWrapped = true
- speed_g.Name = "speed"
- speed_g.Parent = bg
- speed_g.Position = UDim2.new(0, 0, 0.5, 0)
- speed_g.Size = UDim2.new(1, 0, 0.5, 0)
- speed_g.BackgroundColor = BrickColor.new("Dark taupe")
- speed_g.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
- speed_g.Font = Enum.Font.SourceSans
- speed_g.FontSize = Enum.FontSize.Size14
- speed_g.Text = "Speed: N/A"
- speed_g.TextColor = BrickColor.new("Institutional white")
- speed_g.TextColor3 = Color3.new(1, 1, 1)
- speed_g.TextScaled = true
- speed_g.TextSize = 14
- speed_g.TextStrokeTransparency = 0
- speed_g.TextWrap = true
- speed_g.TextWrapped = true
- end
- function make_base()
- base = Instance.new("Part")
- base.CFrame = CFrame.new(root.Position)*CFrame.new(size/2,-3,size/2)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
- base.Size = Vector3.new(0.5, size, size)
- base.Material = Enum.Material.Concrete
- base.Shape = Enum.PartType.Cylinder
- base.Parent = part_folder
- center = Instance.new("Part")
- center.Size = Vector3.new(1, 2, 1)
- center.CFrame = CFrame.new(base.Position)*CFrame.new(0,1,0)
- center.Material = Enum.Material.DiamondPlate
- center.CanCollide = false
- center.Parent = part_folder
- spinner = Instance.new("Part")
- spinner.CFrame = CFrame.new(center.Position)*CFrame.new(0,center.Size.Y*0.75,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
- spinner.Size = Vector3.new(1, size, 1)
- spinner.Color = Color3.new(0,0,1)
- spinner.Material = Enum.Material.Neon
- spinner.CanCollide = false
- spinner.Parent = part_folder
- for i,v in pairs(part_folder:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored = true
- v.Locked = true
- end
- end
- part_folder.Parent = script
- make_gui(center)
- wait(5)
- playing = true
- connect_touch(spinner)
- connect_spin(spinner)
- end
- make_base()
Add Comment
Please, Sign In to add comment