Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*===============================================================================================
- Space Room :P
- ===============================================================================================*/
- local Scale = 0.01
- local Min = Vector(-7888, -8909, -11306)
- local Max = Vector(-8715, -8334, -11103)
- local Center = Min + ((Max - Min) / 2)
- local ScaleV = Vector(Scale, Scale, Scale)
- local Player = LocalPlayer()
- hook.Add("PostDrawTranslucentEntities", "SpaceRoom", function()
- local Pos = Player:GetPos() -- Check if the player is in the SpaceRoom =D
- if (Pos.x > Min.x and Pos.x > Min.x and Pos.x > Min.x) then return end
- if (Pos.x < Max.x and Pos.x < Max.x and Pos.x < Max.x) then return end
- -- Test Code
- for _, Entity in pairs( ents.GetAll() ) do
- if Entity and Entity:IsValid() and Entity.Draw then
- Entity:SetRenderOrigin(Center + (Entity:GetPos() / Scale))
- local OldScale = Entity:GetModelScale()
- Entity:SetModelScale(ScaleV)
- Entity:SetupBones()
- Entity:Draw()
- Entity:SetModelScale(OldScale)
- Entity:SetRenderOrigin(nil)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment