Advertisement
sneakydodge123

tower

Sep 3rd, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.36 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145.  
  146.  
  147. --[[
  148. Island Dimension made by Fenrier.
  149. ]]
  150. it=Instance.new
  151. vt=Vector3.new
  152. cf=CFrame.new
  153. euler=CFrame.fromEulerAnglesXYZ
  154. angles=CFrame.Angles
  155. teledebounce=false
  156. teledebounce2=false
  157.  
  158. if workspace.Base:findFirstChild("Tower Model",true) ~= nil then
  159. workspace.Base:findFirstChild("Tower Model",true).Parent = nil
  160. end
  161.  
  162.  
  163. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size,cframe)
  164. local fp = it("Part")
  165. fp.formFactor = formfactor
  166. fp.Parent = parent
  167. fp.Reflectance = reflectance
  168. fp.Transparency = transparency
  169. fp.CanCollide = true
  170. fp.Anchored = true
  171. fp.Locked=true
  172. fp.BrickColor = brickcolor
  173. fp.Name = name
  174. fp.Size = size
  175. fp.CFrame = cframe
  176. fp.BottomSurface="Smooth"
  177. fp.TopSurface="Smooth"
  178. fp:BreakJoints()
  179. return fp
  180. end
  181.  
  182. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  183. local mesh = it(Mesh)
  184. mesh.Parent = part
  185. if Mesh=="SpecialMesh" then
  186. mesh.MeshType = meshtype
  187. mesh.MeshId = meshid
  188. end
  189. mesh.Offset=offset
  190. mesh.Scale=scale
  191. return mesh
  192. end
  193.  
  194. function weld(parent,part0,part1,c0)
  195. local weld = it("Weld")
  196. weld.Parent = parent
  197. weld.Part0 = part0
  198. weld.Part1 = part1
  199. weld.C0 = c0
  200. return weld
  201. end
  202.  
  203. local modelzorz = Instance.new("Model")
  204. modelzorz.Parent = workspace.Base
  205. modelzorz.Name = "Tower Model"
  206. script.Parent=modelzorz
  207.  
  208. local prt1=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part1",vt(2,100,20),cf(100,50,20))
  209. local prt2=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part2",vt(2,100,20),cf(100,50,-20))
  210. local prt3=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part3",vt(2,80,20),cf(100,60,0))
  211. local prt4=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part4",vt(2,100,60),cf(130,50,29)*euler(0,1.57,0))
  212. local prt5=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part5",vt(2,100,60),cf(130,50,-29)*euler(0,1.57,0))
  213. local prt6=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part6",vt(2,100,60),cf(160,50,0))
  214. local prt7=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part7",vt(80,2,80),cf(130,100,0))
  215. local prt8=part(3,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part8",vt(20,3,20),cf(150,100,0))
  216. local prt9=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part9",vt(3,3,79.99),cf(91.51,101,0))
  217. local prt10=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part10",vt(3,3,79.99),cf(168.49,101,0))
  218. local prt11=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part11",vt(3,3,79.99),cf(130,101,38.48)*euler(0,1.57,0))
  219. local prt12=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part12",vt(3,3,79.99),cf(130,101,-38.48)*euler(0,1.57,0))
  220. local prt13=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part13",vt(2,20,20),cf(100,110,20))
  221. local prt14=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part14",vt(2,20,20),cf(100,110,-20))
  222. local prt15=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part15",vt(2,20,20),cf(110,110,29)*euler(0,1.57,0))
  223. local prt16=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part16",vt(2,20,20),cf(150,110,29)*euler(0,1.57,0))
  224. local prt17=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part17",vt(2,20,20),cf(160,110,20))
  225. local prt18=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part18",vt(2,20,20),cf(160,110,-20))
  226. local prt19=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part19",vt(2,20,20),cf(110,110,-29)*euler(0,1.57,0))
  227. local prt20=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part20",vt(2,20,20),cf(150,110,-29)*euler(0,1.57,0))
  228. local prt21=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part21",vt(61.9,2,60),cf(130,120,0))
  229. local prt22=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part22",vt(60,2,60),cf(130,128,0))
  230. local prt23=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part23",vt(60,2,60),cf(1500,1500,1500))
  231. local prt24=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part24",vt(2,100,60),prt23.CFrame*cf(-30,50,0))
  232. local prt25=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part25",vt(2,100,60),prt23.CFrame*cf(30,50,0))
  233. local prt26=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part26",vt(2,100,60),prt23.CFrame*cf(0,50,30)*euler(0,1.57,0))
  234. local prt27=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part27",vt(2,100,60),prt23.CFrame*cf(0,50,-30)*euler(0,1.57,0))
  235. local prt28=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part28",vt(20,100,20),prt23.CFrame*cf(0,50,0))
  236. BasicCFrame=prt28.CFrame*cf(0,50,0)
  237. local prt29=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part29",vt(199,2,62),BasicCFrame*cf(130.5,0,0))
  238. prt29.Material="Grass"
  239. local prt30=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part30",vt(199,2,62),BasicCFrame*cf(-130.5,0,0))
  240. prt30.Material="Grass"
  241. local prt31=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part31",vt(460,2,200),BasicCFrame*cf(0,0,131))
  242. prt31.Material="Grass"
  243. local prt32=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part32",vt(460,2,200),BasicCFrame*cf(0,0,-131))
  244. prt32.Material="Grass"
  245. local prt33=part(3,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part33",vt(50,2.2,200),BasicCFrame*cf(0,0,-131))
  246. local prt34=part(3,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part34",vt(50,2.2,200),BasicCFrame*cf(0,0,131))
  247. local prt35=part(3,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part35",vt(35,2.2,62),BasicCFrame*cf(-7.5,0,0))
  248. local prt35b=part(3,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part35b",vt(15,2.2,31),BasicCFrame*cf(17.5,0,-15.5))
  249. local prt36=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part36",vt(60,2,30),BasicCFrame*cf(0,-1,-15))
  250. local prt37=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part37",vt(30,2,30),BasicCFrame*cf(-25,-1,15)*euler(0,1.57,0))
  251. local prt38=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Part38",vt(220,100,62),BasicCFrame*cf(141,-51,0))
  252. prt38.Material="Slate"
  253. local prt39=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Part39",vt(220,100,62),BasicCFrame*cf(-141,-51,0))
  254. prt39.Material="Slate"
  255. local prt40=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Part40",vt(502,100,220),BasicCFrame*cf(0,-51,141))
  256. prt40.Material="Slate"
  257. local prt41=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Part41",vt(502,100,220),BasicCFrame*cf(0,-51,-141))
  258. prt41.Material="Slate"
  259. local prt42=part(3,modelzorz,0,0.5,BrickColor.new("Bright blue"),"Part42",vt(20,200,20),BasicCFrame*cf(0,100,225))
  260. prt42.CanCollide=false
  261. local prt43=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part43",vt(80,5,80),BasicCFrame*cf(0,200,225))
  262. prt43.Material="Wood"
  263. local prt44=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part44",vt(40,10,40),BasicCFrame*cf(0,200,225))
  264. local prt45=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part45",vt(1,1,80),BasicCFrame*cf(39.5,208,225)*euler(math.rad(math.random(-2,1)+math.random()),math.rad(math.random(-2,1)+math.random()),math.rad(math.random(-2,1)+math.random())))
  265. prt45.Material="Wood"
  266. local prt46=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part46",vt(1,1,80),BasicCFrame*cf(-39.5,208,225)*euler(math.rad(math.random(-2,1)+math.random()),math.rad(math.random(-2,1)+math.random()),math.rad(math.random(-2,1)+math.random())))
  267. prt46.Material="Wood"
  268. local prt47=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part47",vt(1,80,1),BasicCFrame*cf(0,208,225-39.5)*euler(math.rad(math.random(-2,1)+math.random()),math.rad(math.random(-2,1)+math.random()),1.57+math.rad(math.random(-2,1)+math.random())))
  269. prt47.Material="Wood"
  270. local prt48=part(3,modelzorz,0,0.5,BrickColor.new("Bright blue"),"Part48",vt(20,20,20),prt43.CFrame*cf(0,5,0))
  271. prt48.CanCollide=false
  272. local prt49=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part49",vt(1,1,95),prt43.CFrame*cf(12,2,87))
  273. prt49.Material="Wood"
  274. local prt50=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part49",vt(1,1,95),prt43.CFrame*cf(-12,2,87))
  275. prt50.Material="Wood"
  276.  
  277. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  278. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,1,1))
  279. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1,1,1))
  280. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1,1,1))
  281. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,1,1))
  282. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1,1,1))
  283. local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(1,1,1))
  284. local msh8=mesh("BlockMesh",prt8,"","",vt(0,0,0),vt(1,1,1))
  285. local msh9=mesh("BlockMesh",prt9,"","",vt(0,0,0),vt(1,1,1))
  286. local msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(1,1,1))
  287. local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(1,1,1))
  288. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(1,1,1))
  289. local msh13=mesh("BlockMesh",prt13,"","",vt(0,0,0),vt(1,1,1))
  290. local msh14=mesh("BlockMesh",prt14,"","",vt(0,0,0),vt(1,1,1))
  291. local msh15=mesh("BlockMesh",prt15,"","",vt(0,0,0),vt(1,1,1))
  292. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(1,1,1))
  293. local msh17=mesh("BlockMesh",prt17,"","",vt(0,0,0),vt(1,1,1))
  294. local msh18=mesh("BlockMesh",prt18,"","",vt(0,0,0),vt(1,1,1))
  295. local msh19=mesh("BlockMesh",prt19,"","",vt(0,0,0),vt(1,1,1))
  296. local msh20=mesh("BlockMesh",prt20,"","",vt(0,0,0),vt(1,1,1))
  297. local msh21=mesh("BlockMesh",prt21,"","",vt(0,0,0),vt(1,1,1))
  298. local msh22=mesh("SpecialMesh",prt22,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(45,10,45))
  299. local msh23=mesh("BlockMesh",prt23,"","",vt(0,0,0),vt(1,1,1))
  300. local msh24=mesh("BlockMesh",prt24,"","",vt(0,0,0),vt(1,1,1))
  301. local msh25=mesh("BlockMesh",prt25,"","",vt(0,0,0),vt(1,1,1))
  302. local msh26=mesh("BlockMesh",prt26,"","",vt(0,0,0),vt(1,1,1))
  303. local msh27=mesh("BlockMesh",prt27,"","",vt(0,0,0),vt(1,1,1))
  304. local msh28=mesh("CylinderMesh",prt28,"","",vt(0,0,0),vt(1,1,1))
  305. local msh42=mesh("CylinderMesh",prt42,"","",vt(0,0,0),vt(1,1,1))
  306. local msh48=mesh("SpecialMesh",prt48,"Sphere","",vt(0,0,0),vt(1,1,1))
  307.  
  308. local basestairprt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Base Stair Part1",vt(61.9,2,60),cf(130,2,0))
  309. local basestairmsh=mesh("BlockMesh",basestairprt,"","",vt(0,0,0),vt(1,1,1))
  310. local basestairprt2=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Base Stair Part2",vt(20,100,20),cf(130,50,0))
  311. local basestairmsh2=mesh("CylinderMesh",basestairprt2,"","",vt(0,0,0),vt(1,1,1))
  312.  
  313. local teleprt=part(3,modelzorz,0,1,BrickColor.new("Black"),"Teleport Part",vt(61,10,59),cf(130,95,0))
  314. teleprt.CanCollide=false
  315. local teleprt2=part(3,modelzorz,0,1,BrickColor.new("Black"),"Teleport Part2",vt(61,10,59),prt23.CFrame*cf(0,6,0))
  316. teleprt2.CanCollide=false
  317. local teleprt3=part(3,modelzorz,0,1,BrickColor.new("Bright blue"),"Teleport Part3",vt(1000,10,1000),BasicCFrame*cf(0,-300,0))
  318. teleprt3.CanCollide=false
  319.  
  320. local skyboxprt=part(3,modelzorz,0,0,BrickColor.new("Black"),"Skybox",vt(1,1,1),BasicCFrame)
  321. local skyboxmsh=mesh("SpecialMesh",skyboxprt,"FileMesh","http://www.roblox.com/asset/?id=1527559",vt(0,0,0),vt(-1000,-1000,-1000))
  322. skyboxmsh.TextureId="http://www.roblox.com/asset/?id=24824960"
  323. coroutine.resume(coroutine.create(function()
  324. while true do
  325. wait()
  326. skyboxprt.CFrame=skyboxprt.CFrame*angles(math.pi/math.random(4000,6000),math.pi/math.random(4000,6000),math.pi/math.random(4000,6000))
  327. end
  328. end))
  329. for i=1,8 do
  330. local tree1=part(3,modelzorz,0,0,BrickColor.new("Brown"),"Tree1",vt(3,20,3),BasicCFrame*cf(math.random(30,200),10,math.random(-200,200)))
  331. local treemsh1=mesh("CylinderMesh",tree1,"","",vt(0,0,0),vt(1,1,1))
  332. local tree2=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Tree2",vt(15,15,15),tree1.CFrame*cf(0,30,0))
  333. tree2.Shape=0
  334. tree2.Material="Grass"
  335. tree2.CFrame=tree1.CFrame*cf(0,10,0)
  336. local grass=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Grass",vt(1,1,1),BasicCFrame*cf(math.random(30,200),2.5,math.random(-200,200)))
  337. local grassmsh=mesh("SpecialMesh",grass,"FileMesh","http://www.roblox.com/asset/?id=1091940",vt(0,0,0),vt(2,2,2))
  338. grassmsh.TextureId="http://www.roblox.com/asset/?id=1091942"
  339. end
  340. for i=1,8 do
  341. local tree1=part(3,modelzorz,0,0,BrickColor.new("Brown"),"Tree1",vt(3,20,3),BasicCFrame*cf(math.random(-200,-30),10,math.random(-200,200)))
  342. local treemsh1=mesh("CylinderMesh",tree1,"","",vt(0,0,0),vt(1,1,1))
  343. local tree2=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Tree2",vt(15,15,15),tree1.CFrame*cf(0,30,0))
  344. tree2.Shape=0
  345. tree2.Material="Grass"
  346. tree2.CFrame=tree1.CFrame*cf(0,10,0)
  347. local grass=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Grass",vt(1,1,1),BasicCFrame*cf(math.random(-200,-30),2.5,math.random(-200,200)))
  348. local grassmsh=mesh("SpecialMesh",grass,"FileMesh","http://www.roblox.com/asset/?id=1091940",vt(0,0,0),vt(2,2,2))
  349. grassmsh.TextureId="http://www.roblox.com/asset/?id=1091942"
  350. end
  351.  
  352. con1=teleprt.Touched:connect(function(hit)
  353. if hit.Parent:findFirstChild("Humanoid")~=nil and teledebounce==false and hit.Parent:FindFirstChild("Torso")~=nil then
  354. print("Teleported")
  355. teledebounce=true
  356. hit.Parent.Torso.CFrame=prt23.CFrame*cf(0,5,20)
  357. wait(2)
  358. teledebounce=false
  359. end
  360. end)
  361. con2=teleprt2.Touched:connect(function(hit)
  362. if hit.Parent:findFirstChild("Humanoid")~=nil and teledebounce==false and hit.Parent:FindFirstChild("Torso")~=nil then
  363. print("Teleported")
  364. teledebounce=true
  365. hit.Parent.Torso.CFrame=teleprt.CFrame*cf(0,-5,15)
  366. wait(2)
  367. teledebounce=false
  368. end
  369. end)
  370. con3=prt42.Touched:connect(function(hit)
  371. if hit.Parent:findFirstChild("Humanoid")~=nil and teledebounce2==false and hit.Parent:FindFirstChild("Torso")~=nil then
  372. print("Teleported to Statue Island.")
  373. teledebounce2=true
  374. Torso=hit.Parent.Torso
  375. Torso.Anchored=true
  376. Torso.CFrame=prt42.CFrame*cf(0,-95,0)
  377. wait(2)
  378. numb2=0
  379. for i=0,20 do
  380. wait(0)
  381. Torso.CFrame=prt42.CFrame*cf(0,-95+numb2,0)
  382. numb2=numb2+10
  383. end
  384. Torso.Anchored=false
  385. Torso.Velocity=vt(0,200,0)
  386. wait(2)
  387. teledebounce2=false
  388. end
  389. end)
  390. con4=prt48.Touched:connect(function(hit)
  391. if hit.Parent:findFirstChild("Humanoid")~=nil and teledebounce2==false and hit.Parent:FindFirstChild("Torso")~=nil then
  392. print("Teleported out Statue Island.")
  393. teledebounce2=true
  394. Torso=hit.Parent.Torso
  395. Torso.Anchored=true
  396. Torso.CFrame=prt48.CFrame*cf(0,3,0)
  397. wait(2)
  398. numb2=0
  399. for i=0,20 do
  400. wait(0)
  401. Torso.CFrame=prt48.CFrame*cf(0,3-numb2,0)
  402. numb2=numb2+10
  403. end
  404. Torso.Anchored=false
  405. wait(2)
  406. teledebounce2=false
  407. end
  408. end)
  409. con5=teleprt3.Touched:connect(function(hit)
  410. if hit.Parent:findFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  411. print("Fallen Teleport")
  412. hit.Parent.Torso.CFrame=teleprt3.CFrame*cf(-1500,-1000,-1500)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  413. hit.Parent.Humanoid.PlatformStand=true
  414. end
  415. end)
  416.  
  417. for i=0,50 do
  418. prtsize=math.random(1,20)
  419. local prt=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Brick",vt(prtsize,prtsize,prtsize),BasicCFrame*cf(math.random(-500,500),math.random(-500,500),math.random(-500,500))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)))
  420. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  421. coroutine.resume(coroutine.create(function(Part)
  422. randomnumb=math.random(1,10)+math.random()
  423. wait(randomnumb)
  424. while Part.Parent~=nil do
  425. for i=0,1,0.005 do
  426. wait()
  427. Part.Position=Part.Position+vt(0,-0.2,0)
  428. end
  429. for i=0,1,0.005 do
  430. wait()
  431. Part.Position=Part.Position+vt(0,0.2,0)
  432. end
  433. end
  434. end),prt)
  435. end
  436.  
  437. for i=0,15 do
  438. prtsize=math.random(0,3)+math.random()
  439. local prt=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Brick",vt(prtsize,prtsize,prtsize),BasicCFrame*cf(math.random(-50,50),math.random(5,170),math.random(200,250))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)))
  440. prt.Material="Grass"
  441. coroutine.resume(coroutine.create(function(Part)
  442. randomnumb=math.random(1,10)+math.random()
  443. wait(randomnumb)
  444. while Part.Parent~=nil do
  445. for i=0,1,0.005 do
  446. wait()
  447. Part.Position=Part.Position+vt(0,-0.2,0)
  448. end
  449. for i=0,1,0.005 do
  450. wait()
  451. Part.Position=Part.Position+vt(0,0.2,0)
  452. end
  453. end
  454. end),prt)
  455. end
  456.  
  457. count=0
  458. for i=1,15 do
  459. local prt=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part",vt(1,3,1),BasicCFrame*cf(39.5-count,205,225-39.5)*euler(math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random())))
  460. prt.Material="Wood"
  461. local prt=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part",vt(1,3,1),BasicCFrame*cf(39.5,205,225-39.5+count)*euler(math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random())))
  462. prt.Material="Wood"
  463. local prt=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part",vt(1,3,1),BasicCFrame*cf(-39.5,205,225-39.5+count)*euler(math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random()),math.rad(math.random(-30,29)+math.random())))
  464. prt.Material="Wood"
  465. count=count+5.64
  466. end
  467.  
  468. count=0
  469. for i=1,15 do
  470. local prt48=part(3,modelzorz,0,0,BrickColor.new("Dusty Rose"),"Part48",vt(20,1,5),prt43.CFrame*cf(0,2,42+count)*euler(math.rad(math.random(-10,9)+math.random()),math.rad(math.random(-10,9)+math.random()),math.rad(math.random(-10,9)+math.random())))
  471. prt48.Material="Wood"
  472. count=count+6
  473. end
  474.  
  475. count=-0.25
  476. for i=0,164 do
  477. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stair",vt(2,3,20),basestairprt.CFrame*euler(0,count,0)*cf(0,0.5+(count*12),19))
  478. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  479. light = Instance.new("PointLight")
  480. light.Brightness = .8
  481. light.Range = 100
  482. light.Parent=prt
  483. count=count+0.05
  484. end
  485. count=0
  486. for i=0,160 do
  487. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stair2",vt(2,3,20),prt23.CFrame*euler(0,count,0)*cf(0,0.5+(count*12),19))
  488. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  489. light = Instance.new("PointLight")
  490. light.Brightness = .8
  491. light.Range = 100
  492. light.Parent=prt
  493. count=count+0.05
  494. end
  495. count=0
  496. for i=0,15 do
  497. local prt=part(3,modelzorz,0,1-count,BrickColor.new("Black"),"Shade",vt(61,1,59),cf(130,70+(count*40),0))
  498. prt.CanCollide=false
  499. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  500. count=count+0.05
  501. end
  502. count=0
  503. for i=0,15 do
  504. local prt=part(3,modelzorz,0,count,BrickColor.new("Black"),"Shade2",vt(61,1,59),prt23.CFrame*cf(0,count*40,0))
  505. prt.CanCollide=false
  506. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  507. count=count+0.05
  508. end
  509. count=0
  510. for i=0,15 do
  511. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stand",vt(2.99,3,3),cf(91.51,104,38.48-count))
  512. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  513. count=count+5.13
  514. end
  515. count=0
  516. for i=0,15 do
  517. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stand",vt(2.99,3,3),cf(168.49,104,38.48-count))
  518. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  519. count=count+5.13
  520. end
  521. count=5.13
  522. for i=0,13 do
  523. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stand",vt(2.99,3,3),cf(91.51+count,104,38.48))
  524. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  525. count=count+5.13
  526. end
  527. count=5.13
  528. for i=0,13 do
  529. local prt=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Stand",vt(2.99,3,3),cf(91.51+count,104,-38.48))
  530. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(1,1,1))
  531. count=count+5.13
  532. end
  533. print("Fenrier's Tower Dimension loaded.")
  534. --workspace.Fenrier.Torso.CFrame=teleprt2.CFrame*cf(0,150,0)
  535. -- mediafire
  536. --[[
  537. Copyrighted (C) Fenrier 2013
  538. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement