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/bw1JwFXU'
- print'Yeah basically '
- print'/sans <keyword: player name>'
- print' Basically wont let them play until sans gets tired. if they die, they restart.'
- local function oofsans(owner1)
- if workspace:FindFirstChild'∞box'then
- workspace:FindFirstChild'∞box':Destroy()
- end
- script.Parent = owner1
- local repstor = game:GetService("ReplicatedStorage")
- local players = game:GetService("Players")
- local osans = repstor:FindFirstChild('∞sans')
- 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, 1)
- 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)
- 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
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- if hit.Parent.Name==osans.Value then
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- hit.Parent:FindFirstChild'Head':Destroy()
- if hit.Parent.Name==osans.Value then
- 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
- hit.Parent:FindFirstChildWhichIsA'Humanoid'.Health = 0
- if hit.Parent.Name==osans.Value then
- died = true
- end
- elseif hit.Parent:FindFirstChild'Head'then
- hit.Parent:FindFirstChild'Head':Destroy()
- if hit.Parent.Name==osans.Value then
- 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()
- wait(.25)
- 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
- if osans then
- MakeGrounds(GetPlayerFromKeyword(osans.Value))
- end
- 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)
- owner1.Chatted:Connect(function(msg)
- if msg:sub(1,6):lower()=='/sans 'then
- local tarpl = GetPlayerFromKeyword(msg:sub(7))
- if tarpl then
- local strval = repstor:FindFirstChild('∞sans')
- local scheck1 = false
- if strval then
- strval.Value = tarpl.Name
- scheck1 = true
- else
- strval = Instance.new("StringValue",repstor)
- strval.Value = tarpl.Name
- strval.Name = '∞sans'
- scheck1 = true
- end
- if scheck1 then
- GetPlayerFromKeyword(strval.Value):LoadCharacter()
- MakeGrounds(GetPlayerFromKeyword(strval.Value))
- end
- 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)
- 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)
- end)
- workspace.ChildRemoved:Connect(function(de)
- local osans = repstor:FindFirstChild('∞sans')
- if de.Name=='∞box' and osans then
- wait(1)
- MakeGrounds(GetPlayerFromKeyword(osans.Value))
- end
- end)
- end
- wait(1)
- oofsans(owner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement