Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- New command is /sans <kw> instead of /s <kw> to avoid vsb stuff
- print'Source : https://pastebin.com/TysgGFTV'
- print' Basically wont let them play until sans gets tired. if they die, they restart.'
- local function oofsans(owner1)
- script.Parent = owner1
- local repstor = game:GetService("ReplicatedStorage")
- local players = game:GetService("Players")
- local function MakeSound(par,id,vol,looped1)
- local s = Instance.new("Sound",par)
- s.SoundId = id
- s.Volume = vol
- s.Looped = looped1
- s:Play()
- if looped1==false then
- s.Ended:connect(function()
- s:Destroy()
- end)
- end
- end
- local function weldif(p1,p2)
- local w = Instance.new("WeldConstraint",p1)
- w.Part0 = p1
- w.Part1 = p2
- end
- local function GetPlayerFromKeyword(kw)
- for _,v in pairs(game:GetService'Players':GetPlayers())do
- local vname = v.Name
- if string.find(
- vname:reverse():lower(),
- kw:reverse():lower(),
- vname:len()-kw:len()
- )~=nil then
- return v
- end
- end
- end
- local function Box(player)
- local pchar = player.Character
- if pchar then
- local phead = pchar:FindFirstChild'Head'
- if phead then
- phead.CFrame = phead.CFrame + Vector3.new(0,17.5,0)
- local mod = Instance.new("Model",workspace)
- mod.Name = '∞box'
- local p1 = Instance.new("Part",mod)
- p1.Position = phead.Position + Vector3.new(0,-15,0)
- p1.Size = Vector3.new(30, 2, 30)
- p1.Name = '∞base'
- local sans = Instance.new("Part",mod)
- sans.Position = phead.Position + Vector3.new(0,-12.5,-14)
- sans.Size = Vector3.new(4, 4, .01)
- local d = Instance.new("Decal",sans)
- d.Texture = 'rbxassetid://1105996889'
- d.Face = Enum.NormalId.Back
- local d2 = Instance.new("Decal",sans)
- d2.Texture = 'rbxassetid://1105996889'
- d2.Face = Enum.NormalId.Front
- local p2 = Instance.new("Part",mod)
- p2.Position = phead.Position + Vector3.new(0,15,0)
- p2.Size = Vector3.new(30, 2, 30)
- local p3 = Instance.new("Part",mod)
- p3.Position = phead.Position + Vector3.new(-15,0,0)
- p3.Size = Vector3.new(2, 30, 30)
- local p4 = Instance.new("Part",mod)
- p4.Position = phead.Position + Vector3.new(15,0,0)
- p4.Size = Vector3.new(2, 30, 30)
- local p5 = Instance.new("Part",mod)
- p5.Position = phead.Position + Vector3.new(0,0,15)
- p5.Size = Vector3.new(30, 30, 2)
- local p6 = Instance.new("Part",mod)
- p6.Position = phead.Position + Vector3.new(0,0,-15)
- p6.Size = Vector3.new(30, 30, 2)
- local surg = Instance.new("SurfaceGui",p6)
- surg.Face = Enum.NormalId.Back
- local tl1 = Instance.new("TextLabel",surg)
- tl1.BackgroundTransparency = 1
- tl1.Text = 'Say "/flee" to flee.'
- tl1.TextColor3 = Color3.new(255,255,255)
- tl1.TextScaled = true
- tl1.TextStrokeTransparency = 0
- tl1.Size = UDim2.new(1,0,1,0)
- local surg2 = Instance.new("SurfaceGui",p6)
- surg2.Face = Enum.NormalId.Front
- local tl2 = Instance.new("TextLabel",surg2)
- tl2.BackgroundTransparency = 1
- tl2.Text = 'Say "/flee" to flee.'
- tl2.TextColor3 = Color3.new(255,255,255)
- tl2.TextScaled = true
- tl2.TextStrokeTransparency = 0
- tl2.Size = UDim2.new(1,0,1,0)
- for _,v in pairs(mod:GetChildren())do
- v.Anchored = true
- v.Massless = true
- v.Material = Enum.Material.Grass
- v.BrickColor = BrickColor.new('Sea green')
- if v~=p1 then
- v.Transparency = 1
- end
- end
- end
- end
- end
- local function MakeGrounds(targetplayer)
- if workspace:FindFirstChild('∞box')==nil then
- local tpl = targetplayer
- if tpl~=nil then
- local tch = tpl.Character
- local tsg = Instance.new("ScreenGui",tpl:FindFirstChildWhichIsA'PlayerGui')
- tsg.ResetOnSpawn = false
- tsg.Name = '∞ssgui'
- local f1 = Instance.new("Frame",tsg)
- f1.Position = UDim2.new(1,0,0,0)
- f1.Size = UDim2.new(1,0,1,0)
- f1.BackgroundColor3 = Color3.new(0,0,0)
- f1:TweenPosition(UDim2.new(0,0,0,0))
- wait(1)
- MakeSound(tch,'rbxassetid://3263122823',5,false)
- Box(tpl)
- wait(1)
- if tpl:FindFirstChild('∞ssgui',true) then
- if tpl:FindFirstChild('∞ssgui',true).Frame then
- tpl:FindFirstChild('∞ssgui',true).Frame:TweenPosition(UDim2.new(-1,0,0,0))
- end
- end
- wait(1)
- if tpl:FindFirstChild('∞ssgui',true) then
- tpl:FindFirstChild('∞ssgui',true):Destroy()
- end
- MakeSound(workspace:FindFirstChild('∞box'),'rbxassetid://3209932218',2.5,true)
- wait(1.5)
- local died = false
- local function ballhit()
- local base = workspace:FindFirstChild('∞base',true)
- if base and tch:FindFirstChild'Head'and died==false then
- local par1 = Instance.new("Part",workspace)
- par1.Shape = Enum.PartType.Ball
- par1.Size = Vector3.new(3,3,3)
- par1.Position = tch:FindFirstChild'Head'.Position + Vector3.new(0,20,0)
- par1.BrickColor = BrickColor.new("Really red")
- par1.Material = Enum.Material.Granite
- par1.CanCollide = false
- par1.Touched:Connect(function(hit)
- local osans = repstor:FindFirstChild('∞sans')
- if osans and died==false then
- if hit.Parent:FindFirstChildWhichIsA'Humanoid' then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChild'Head':Destroy()
- died = true
- end
- end
- end
- end)
- wait(.5)
- end
- end
- local function misslemiddle()
- local base = workspace:FindFirstChild('∞base',true)
- if base and tch:FindFirstChild'Head'and died==false then
- local thead = tch:FindFirstChild'Head'
- local part1 = Instance.new("Part",workspace)
- part1.Size = Vector3.new(2,2,2)
- part1.BrickColor = BrickColor.new("Really red")
- part1.Material = Enum.Material.Granite
- part1.CanCollide = false
- part1.Anchored = true
- part1.CFrame = thead.CFrame * CFrame.new(0,0,30)
- part1.Touched:Connect(function(hit)
- local osans = repstor:FindFirstChild('∞sans')
- if osans and died==false then
- if hit.Parent:FindFirstChildWhichIsA'Humanoid' then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChild'Head':Destroy()
- died = true
- end
- end
- end
- end)
- wait()
- for i=1,30 do
- part1.CFrame = part1.CFrame * CFrame.new(0,0,-2)
- wait()
- end
- part1.Anchored = false
- end
- end
- local function floorobj1()
- local base = workspace:FindFirstChild('∞base',true)
- if base and tch:FindFirstChild'Head'and died==false then
- local thead = tch:FindFirstChild'Head'
- local part1 = Instance.new("Part",workspace)
- part1.Size = Vector3.new(40,1,1)
- part1.BrickColor = BrickColor.new("Really red")
- part1.Material = Enum.Material.Granite
- part1.CanCollide = false
- part1.Anchored = true
- part1.CFrame = thead.CFrame * CFrame.new(0,-3,30)
- part1.Touched:Connect(function(hit)
- local osans = repstor:FindFirstChild('∞sans')
- if osans and died==false then
- if hit.Parent:FindFirstChildWhichIsA'Humanoid' then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChild'Head':Destroy()
- died = true
- end
- end
- end
- end)
- wait()
- for i=1,30 do
- part1.CFrame = part1.CFrame * CFrame.new(0,0,-2)
- wait()
- end
- part1.Anchored = false
- end
- end
- local function barvert()
- local base = workspace:FindFirstChild('∞base',true)
- if base and tch:FindFirstChild'Head'and died==false then
- local thead = tch:FindFirstChild'Head'
- local part1 = Instance.new("Part",workspace)
- part1.Size = Vector3.new(1,10,1)
- part1.BrickColor = BrickColor.new("Really red")
- part1.Material = Enum.Material.Granite
- part1.CanCollide = false
- part1.Anchored = true
- part1.CFrame = thead.CFrame * CFrame.new(0,-3,30)
- part1.Touched:Connect(function(hit)
- local osans = repstor:FindFirstChild('∞sans')
- if osans and died==false then
- if hit.Parent:FindFirstChildWhichIsA'Humanoid' then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- if hit.Parent.Name==osans.Value then
- hit.Parent:FindFirstChild'Head':Destroy()
- died = true
- end
- end
- end
- end)
- wait()
- for i=1,30 do
- part1.CFrame = part1.CFrame * CFrame.new(0,0,-2)
- wait()
- end
- part1.Anchored = false
- end
- end
- wait()
- local endnum = 10
- for i=1,endnum do
- local base = workspace:FindFirstChild('∞base',true)
- local rannum = math.random(1,4)
- if rannum==1 then
- for i=1,5 do
- ballhit()
- wait(.25)
- end
- elseif rannum==2 then
- for i=1,5 do
- misslemiddle()
- wait(.25)
- end
- elseif rannum==3 then
- for i=1,5 do
- floorobj1()
- wait(.25)
- end
- elseif rannum==4 then
- for i=1,5 do
- barvert()
- end
- end
- if base==nil or tch:FindFirstChild'Head'==nil then
- break
- end
- if i==endnum and died==false and tpl~=nil then
- local osans = repstor:FindFirstChild('∞sans')
- if osans then
- osans:Destroy()
- end
- local box = workspace:FindFirstChild('∞box')
- if box then
- box:Destroy()
- end
- end
- wait(2)
- end
- end
- end
- end
- local function Start()
- if workspace:FindFirstChild('∞box')==nil then
- if workspace:FindFirstChild('∞start')then
- workspace:FindFirstChild('∞start'):Destroy()
- end
- local sans = Instance.new("Part",workspace)
- sans.Position = Vector3.new(0,2,-10)
- sans.Size = Vector3.new(4, 4, .01)
- sans.Anchored = true
- sans.Transparency = 1
- sans.Name = '∞start'
- local d = Instance.new("Decal",sans)
- d.Texture = 'rbxassetid://1105996889'
- d.Face = Enum.NormalId.Back
- local d2 = Instance.new("Decal",sans)
- d2.Texture = 'rbxassetid://1105996889'
- d2.Face = Enum.NormalId.Front
- local deb = true
- sans.Touched:Connect(function(hit)
- if players:GetPlayerFromCharacter(hit.Parent)and deb then
- deb = false
- local osans2 = repstor:FindFirstChild('∞sans')
- if osans2==nil then
- osans2 = Instance.new("StringValue",repstor)
- osans2.Name = '∞sans'
- end
- osans2.Value = players:GetPlayerFromCharacter(hit.Parent).Name
- sans:Destroy()
- MakeGrounds(players:GetPlayerFromCharacter(hit.Parent))
- wait(5)
- deb = true
- end
- end)
- end
- end
- Start()
- workspace.DescendantAdded:Connect(function(de)
- local osans = repstor:FindFirstChild('∞sans')
- if de:IsA'Tool'and osans and de.Name=='Fly'then
- if osans.Value==de.Parent.Name then
- de:Destroy()
- end
- end
- end)
- for _,v in pairs(players:players())do
- v.CharacterAdded:Connect(function(ch)
- wait()
- local osans = repstor:FindFirstChild('∞sans')
- if osans~=nil then
- if tostring(v.Name )==tostring( osans.Value) then
- if workspace:FindFirstChild'∞box'then
- workspace:FindFirstChild'∞box':Destroy()
- end
- wait()
- end
- end
- end)
- v.Chatted:Connect(function(msg)
- if msg:lower()=='/flee'then
- local osans = repstor:FindFirstChild('∞sans')
- if osans then
- if osans.Value==v.Name then
- osans:Destroy()
- end
- end
- local box = workspace:FindFirstChild('∞box')
- if box then
- box:Destroy()
- end
- end
- end)
- end
- players.PlayerAdded:Connect(function(pr1)
- pr1.CharacterAdded:Connect(function(ch)
- wait()
- local osans = repstor:FindFirstChild('∞sans')
- if osans~=nil then
- if tostring( pr1.Name )==tostring( osans.Value) then
- if workspace:FindFirstChild'∞box'then
- workspace:FindFirstChild'∞box':Destroy()
- end
- end
- end
- end)
- pr1.Chatted:Connect(function(msg)
- local osans = repstor:FindFirstChild('∞sans')
- if msg:lower()=='/flee'and osans then
- if osans.Value==pr1.Name then
- if osans then
- if osans.Value==pr1.Name then
- osans:Destroy()
- end
- end
- local box = workspace:FindFirstChild('∞box')
- if box then
- box:Destroy()
- end
- end
- end
- end)
- end)
- workspace.ChildRemoved:Connect(function(de)
- local osans = repstor:FindFirstChild('∞sans')
- if de.Name=='∞box'then
- if osans then
- wait(1)
- MakeGrounds(GetPlayerFromKeyword(osans.Value))
- else
- Start()
- end
- elseif de.Name=='∞start'then
- if osans==nil then
- Start()
- end
- end
- end)
- players.PlayerRemoving:Connect(function(pl)
- local osans = repstor:FindFirstChild('∞sans')
- if osans then
- if osans.Value==pl.Name then
- osans:Destroy()
- Start()
- end
- end
- end)
- end
- wait(1)
- oofsans(owner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement