Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local part1 = Instance.new("Part", game.Workspace)
- local part6 = Instance.new("Part", part1)
- part6.Size = Vector3.new(0.1,0.1,0.1)
- part6.Transparency = 1
- local weld = Instance.new("Weld", part6)
- weld.Part0 = part1
- weld.Part1 = partl6
- part6.CFrame = CFrame.new(0,0,1.5)
- local part4 = Instance.new("Part", game.Workspace)
- local part3 = Instance.new("Part", game.Workspace)
- local part5 = Instance.new("Part", game.Workspace)
- part1.Size = Vector3.new(1.487, 0.985, 2.72)
- part5.Size = Vector3.new(1.5, 1.5, 1.5)
- part1.Transparency = 1
- part5.Transparency = 1
- part4.Size = Vector3.new(1.487, 0.985, 2.72)
- Meshlol = Instance.new("SpecialMesh")
- Meshlol.Parent = part4
- Meshlol.MeshId = "http://www.roblox.com/asset/?id=2540334246"
- Meshlol.TextureId = "http://www.roblox.com/asset/?id=2540334261"
- Meshlol.Scale = Vector3.new(1, 1, 1)
- Meshlol2 = Instance.new("SpecialMesh")
- Meshlol2.Parent = part3
- Meshlol2.MeshId = "http://www.roblox.com/asset/?id=2540333861"
- Meshlol2.TextureId = "http://www.roblox.com/asset/?id=2540333887"
- Meshlol2.Scale = Vector3.new(1, 1, 1)
- part3.Size = Vector3.new(1.03, 1.044, 1.185)
- part3.CanCollide = false
- part1.Position = Vector3.new(10, 10, 10)
- part5.CanCollide = false
- part5.Anchored = true
- part5.Position = Vector3.new(10, 10, 10)
- Weld4 = Instance.new("Weld")
- Weld4.Parent = part1
- Weld4.Part0 = part1
- Weld4.Part1 = part4
- Weld4.part1 = part4
- Weld4.C1 = part4.CFrame * CFrame.Angles(0, math.rad(180), 0)
- local bg = Instance.new("BodyGyro",part1)
- bg.D = 100
- bg.P = 10000
- bg.MaxTorque = Vector3.new(400000, 400000, 400000)
- local bg2 = Instance.new("BodyGyro",part3)
- bg2.D = 100
- bg2.P = 10000
- bg2.MaxTorque = Vector3.new(0, 400000, 0)
- local bp = Instance.new("BodyPosition",part1)
- bp.D = 100
- bp.P = 10000
- bp.position = Vector3.new(10, 10, 10)
- local bp2 = Instance.new("BodyPosition",part3)
- bp2.D = 100
- bp2.P = 10000
- bp2.position = Vector3.new(10,9.25,10)
- part3.Position = Vector3.new(10,9.25,10)
- wait(0.1)
- part6.CanCollide = false
- part3.CFrame = part3.CFrame * CFrame.Angles(math.rad(180), 0, 0)
- function move(target)
- local dir = (part5.Position - target.Position).unit
- local spawnPos = part5.Position
- local pos = spawnPos + (dir * 1)
- bg.cframe = CFrame.new(pos + dir, pos)
- bg2.cframe = CFrame.new(pos, pos + dir)
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- coroutine.wrap(function()
- while true do
- local torso = findNearestTorso(part5.Position)
- if torso~=nil then
- move(torso)
- end
- task.wait()
- end
- end)()
- part12 = Instance.new("Part", game.Workspace)
- part12.Size = Vector3.new(10,10,0.05)
- part12.Anchored = true
- part12.Position = Vector3.new(20,5,0)
- part12.Reflectance = 1
- local screengui = Instance.new("SurfaceGui",owner.PlayerGui)
- screengui.Adornee = part12
- local viewportFrame = Instance.new("ViewportFrame",screengui)
- local viewportCamera = Instance.new("Camera",viewportFrame)
- test = Instance.new("RemoteEvent",owner.PlayerGui)
- game.Players.PlayerAdded:Connect(function(a)
- local screengui = screengui:Clone()
- screengui.Parent = a.PlayerGui
- screengui.Name = "hello"
- viewportFrame.Size = UDim2.new(1, 0, 1, 0)
- viewportFrame.Position = UDim2.new(0,0,0,0)
- viewportFrame.Name = "gaming"
- for i,v in pairs(game.Workspace:GetDescendants()) do
- if v:IsA("BasePart") then
- if not v:IsA("Terrain") then
- local part = v:Clone()
- part.Parent = viewportFrame
- screengui.Adornee = part12
- viewportFrame.CurrentCamera = viewportCamera
- end
- end
- end
- test.OnServerEvent:Connect(function(player,cf)
- local s, f = pcall(function()
- viewportCamera.CFrame = cf
- end)
- end)
- end)
- local s, f = pcall(function()
- for i, a in pairs(game.Players:GetChildren()) do
- if a:IsA("Player") then
- local screengui = screengui:Clone()
- screengui.Parent = a.PlayerGui
- screengui.Name = "hello"
- viewportFrame.Size = UDim2.new(1, 0, 1, 0)
- viewportFrame.Position = UDim2.new(0,0,0,0)
- viewportFrame.Name = "gaming"
- for i,v in pairs(game.Workspace:GetDescendants()) do
- if v:IsA("BasePart") then
- if not v:IsA("Terrain") then
- local part = v:Clone()
- part.Parent = viewportFrame
- screengui.Adornee = part12
- viewportFrame.CurrentCamera = viewportCamera
- end
- end
- end
- end
- test.OnServerEvent:Connect(function(player,cf)
- local s, f = pcall(function()
- viewportCamera.CFrame = cf
- end)
- end)
- end
- end)
- local s, f = pcall(function()
- for i,v in pairs(game.Workspace:GetDescendants()) do
- if v:IsA("BasePart") then
- if not v:IsA("Terrain") then
- local part = v:Clone()
- part.Parent = viewportFrame
- screengui.Face = Enum.NormalId.Front
- viewportFrame.BackgroundTransparency = 1
- end
- end
- end
- end)
- while true do
- for i,v in pairs(game.Workspace:GetDescendants()) do
- if v:IsA("BasePart") then
- if not v:IsA("Terrain") then
- cf = v.CFrame
- viewportCamera.CFrame = part1.CFrame
- task.wait()
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment