CapsAdmin

Untitled

Mar 31st, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. /*===============================================================================================
  2.     Space Room :P
  3. ===============================================================================================*/
  4.  
  5. local Scale = 0.01
  6. local Min = Vector(-7888, -8909, -11306)
  7. local Max = Vector(-8715, -8334, -11103)
  8.    
  9. local Center = Min + ((Max - Min) / 2)
  10. local ScaleV = Vector(Scale, Scale, Scale)
  11.  
  12. local Player = LocalPlayer()
  13.  
  14. hook.Add("PostDrawTranslucentEntities", "SpaceRoom", function()
  15.    
  16.     local Pos = Player:GetPos() -- Check if the player is in the SpaceRoom =D
  17.    
  18.     if (Pos.x > Min.x and Pos.x > Min.x and Pos.x > Min.x) then return end
  19.     if (Pos.x < Max.x and Pos.x < Max.x and Pos.x < Max.x) then return end
  20.    
  21.     -- Test Code
  22.     for _, Entity in pairs( ents.GetAll() ) do
  23.    
  24.         if Entity and Entity:IsValid() and Entity.Draw then
  25.            
  26.             Entity:SetRenderOrigin(Center + (Entity:GetPos() / Scale))
  27.                 local OldScale = Entity:GetModelScale()
  28.                 Entity:SetModelScale(ScaleV)
  29.                    
  30.                     Entity:SetupBones()
  31.                     Entity:Draw()
  32.                
  33.                 Entity:SetModelScale(OldScale)
  34.             Entity:SetRenderOrigin(nil)
  35.            
  36.         end
  37.    
  38.     end
  39.    
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment