Advertisement
LuaExploitz

Tower Generater

Oct 4th, 2016
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.54 KB | None | 0 0
  1. t = workspace[game.Players.LocalPlayer.Name].Torso.Position
  2. pos = CFrame.new(t.X, 1, t.Z)
  3. Scale = 1
  4.  
  5. CN = CFrame.new
  6. CA = CFrame.Angles
  7. MR = math.rad
  8. MP = math.pi
  9.  
  10. function Part(P, Anch, Coll, Tran, Ref, Col, X, Y, Z)
  11.     local p = Instance.new("Part")
  12.     p.TopSurface = 0
  13.     p.BottomSurface = 0
  14.     p.Transparency = Tran
  15.     p.Reflectance = Ref
  16.     p.CanCollide = Coll
  17.     p.Anchored = Anch
  18.     p.BrickColor = BrickColor.new(Col)
  19.     p.formFactor = "Custom"
  20.     p.Size = Vector3.new(X,Y,Z)
  21.     p.Parent = P
  22.     p.Locked = true
  23.     p:BreakJoints()
  24.     return p
  25. end
  26.  
  27. for i,v in pairs(workspace:children()) do if v.Name == "Tower" then v:remove() end end
  28.  
  29. Mod = Instance.new("Model")
  30. Mod.Name = "Tower"
  31.  
  32. for i = 40, 360, 40 do
  33.     local p = Part(Mod, true, true, 0, 0, "Dark grey", 4.6*Scale, 1*Scale, 25*Scale)
  34.     p.CFrame = pos * CA(0, MR(i), 0)
  35.     local s = 70
  36.     if i == 40 then s = 60 end
  37.     local p2 = Part(Mod, true, true, 0, 0, "Dark grey", 9*Scale, s*Scale, 1*Scale)
  38.     p2.CFrame = pos * CA(0, MR(i), 0) * CN(0, (70/2-0.5+(-(s-70)/2))*Scale, -12*Scale)
  39.     local p3 = Part(Mod, true, true, 0, 0, "Dark grey", 14.4*Scale, 10*Scale, 8*Scale)
  40.     p3.CFrame = pos * CA(0, MR(i), 0) * CN(0, 73.5*Scale, -15.5*Scale)
  41.     for x = -6, 6, 12 do
  42.         local p4 = Part(Mod, true, true, 0, 0, "Dark grey", 5*Scale, 4*Scale, 4*Scale)
  43.         p4.CFrame = p3.CFrame * CN(x*Scale, 5*Scale, -5.5*Scale)
  44.     end
  45. end
  46.  
  47. for i = 0, 77, 1 do
  48.     local p = Part(Mod, true, true, 0, 0, "Medium grey", 4*Scale, 1*Scale, 4*Scale)
  49.     p.CFrame = pos * CA(0, MR((i+4)*15), 0) * CN(0, i*Scale, -9.5*Scale)
  50. end
  51.  
  52. Mod.Parent = workspace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement