Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local TweenService = game:GetService("TweenService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local bot = workspace:WaitForChild("NPC")
- local Table = workspace:WaitForChild("Table")
- local npcChair = Table:WaitForChild("Chair")
- local PlayerChair = Table:WaitForChild("PlayerChair")
- local Gun = workspace:WaitForChild("Gun")
- local OriginalPosition = Gun.CFrame
- local PlayerValue = ReplicatedStorage:WaitForChild("Player")
- local Status = ReplicatedStorage:WaitForChild("Status")
- local chance = {1,2,3,4,5,6} --// dont mind lol
- local Duration = 5
- local Choice = {
- 90, -- Player
- -90 -- npc
- }
- function MakeTween(Target,Time,Destination,Final)
- local a = TweenInfo.new(Time,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0,false)
- local b = TweenService:Create(Target,a,{[Destination] = Final})
- return b
- end
- function GetRandomChance()
- local Ran = math.random(1,#chance)
- return Ran
- end
- function StartRoulette()
- local plr = PlayerValue.Value
- local char = plr.Character
- local RootPart = char.HumanoidRootPart
- MakeTween(Gun,2,"Orientation",Vector3.new(90, -5.003, 0)):Play()
- MakeTween(Gun,2,"CFrame",OriginalPosition):Play()
- if not char.Humanoid.Sit then
- char:MoveTo(PlayerChair.Seat.Position)
- end
- task.wait(2)
- Status.Value = "Spinning.."
- local CurrentAngle = Choice[math.random(1,2)]
- local info = TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0,false)
- local FinalResult = 360 * math.random(2,6) + CurrentAngle
- local Tween = MakeTween(Gun,5,"Orientation",Vector3.new(0,FinalResult,0))
- Tween:Play()
- local spinsfx = Instance.new("Sound",Gun)
- spinsfx.SoundId = "rbxassetid://9113943059"
- spinsfx.Volume = 10
- spinsfx:Play()
- spinsfx.Looped = true
- Tween.Completed:Wait()
- spinsfx:Destroy()
- local Message
- local Target
- if CurrentAngle == 90 then Message = plr.Name.." is choosed" Target = plr.Character elseif CurrentAngle == -90 then Message = bot.Humanoid.DisplayName.." is choosed" Target = bot end
- Status.Value = Message.." 1/"..#chance.." to die"
- task.wait(1.5)
- local Tweens = MakeTween(Gun,2,"CFrame",Target.Head.CFrame * CFrame.new(-2,0,0))
- Tweens:Play()
- Tweens.Completed:Wait()
- local e = GetRandomChance()
- chance[#chance] = nil
- if e == 1 then
- local sound = Instance.new("Sound",Gun)
- sound.SoundId = "rbxassetid://255048411"
- sound.Volume = 10
- sound:Play()
- sound.Ended:Connect(function() sound:Destroy() end)
- task.wait(0.5)
- Target.Humanoid.Health = 0
- if Target.Name == plr.Name then
- plr:Kick("You lost")
- else
- plr:Kick("You won")
- end
- else
- --sound
- task.wait(2)
- StartRoulette()
- end
- end
- StartRoulette()
Advertisement
Add Comment
Please, Sign In to add comment