Advertisement
doryna2281337

Untitled

Aug 16th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.70 KB | None | 0 0
  1. --[[
  2.  
  3. Clockwork Arena made by Fenrier.
  4.  
  5. ]]
  6.  
  7. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  8. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  9. do
  10. print("FE Compatibility code by Mokiros")
  11. script.Parent = Player.Character
  12.  
  13. --RemoteEvent for communicating
  14. local Event = Instance.new("RemoteEvent")
  15. Event.Name = "UserInput_Event"
  16.  
  17. --Fake event to make stuff like Mouse.KeyDown work
  18. local function fakeEvent()
  19. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  20. t.connect = t.Connect
  21. return t
  22. end
  23.  
  24. --Creating fake input objects with fake variables
  25. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  26. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  27. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  28. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  29. end}
  30. --Merged 2 functions into one by checking amount of arguments
  31. CAS.UnbindAction = CAS.BindAction
  32.  
  33. --This function will trigger the events that have been :Connect()'ed
  34. local function te(self,ev,...)
  35. local t = m[ev]
  36. if t and t._fakeEvent and t.Function then
  37. t.Function(...)
  38. end
  39. end
  40. m.TrigEvent = te
  41. UIS.TrigEvent = te
  42.  
  43. Event.OnServerEvent:Connect(function(plr,io)
  44. if plr~=Player then return end
  45. if io.isMouse then
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. else
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76.  
  77. local Mouse = Player:GetMouse()
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  88. end
  89.  
  90. it=Instance.new
  91.  
  92. vt=Vector3.new
  93.  
  94. cf=CFrame.new
  95.  
  96. euler=CFrame.fromEulerAnglesXYZ
  97.  
  98. angles=CFrame.Angles
  99.  
  100. teledebounce=false
  101.  
  102. teledebounce2=false
  103.  
  104. c=game.Players:children()
  105.  
  106. --[[for i=1,#c do
  107.  
  108. if c[i].className=="Player" and c[i].Character:findFirstChild("Torso")~=nil then
  109.  
  110. c[i].Character.Torso.CFrame=c[i].Character.Torso.CFrame*cf(0,50,0)
  111.  
  112. end
  113.  
  114. end]]
  115.  
  116.  
  117.  
  118. if workspace:findFirstChild("Clockwork Arena",true) ~= nil then
  119.  
  120. workspace:findFirstChild("Clockwork Arena",true).Parent = nil
  121.  
  122. end
  123.  
  124.  
  125.  
  126.  
  127.  
  128. function part(formfactor,parent,reflectance,transparency,brickcolor,material,name,size,cframe)
  129.  
  130. local fp = it("Part")
  131.  
  132. fp.formFactor = formfactor
  133.  
  134. fp.Parent = parent
  135.  
  136. fp.Reflectance = reflectance
  137.  
  138. fp.Transparency = transparency
  139.  
  140. fp.CanCollide = true
  141.  
  142. fp.Anchored = true
  143.  
  144. fp.Locked=true
  145.  
  146. fp.BrickColor = brickcolor
  147.  
  148. fp.Name = name
  149.  
  150. fp.Size = size
  151.  
  152. fp.Material = material
  153.  
  154. fp.CFrame = cframe
  155.  
  156. fp.BottomSurface="Smooth"
  157.  
  158. fp.TopSurface="Smooth"
  159.  
  160. fp:BreakJoints()
  161.  
  162. return fp
  163.  
  164. end
  165.  
  166.  
  167.  
  168. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  169.  
  170. local mesh = it(Mesh)
  171.  
  172. mesh.Parent = part
  173.  
  174. if Mesh=="SpecialMesh" then
  175.  
  176. mesh.MeshType = meshtype
  177.  
  178. mesh.MeshId = meshid
  179.  
  180. end
  181.  
  182. mesh.Offset=offset
  183.  
  184. mesh.Scale=scale
  185.  
  186. return mesh
  187.  
  188. end
  189.  
  190.  
  191.  
  192. function weld(parent,part0,part1,c0)
  193.  
  194. local weld = it("Weld")
  195.  
  196. weld.Parent = parent
  197.  
  198. weld.Part0 = part0
  199.  
  200. weld.Part1 = part1
  201.  
  202. weld.C0 = c0
  203.  
  204. return weld
  205.  
  206. end
  207.  
  208.  
  209.  
  210. local modelzorz = Instance.new("Model")
  211.  
  212. modelzorz.Parent = workspace
  213.  
  214. modelzorz.Name = "Clockwork Arena"
  215.  
  216. script.Parent=modelzorz
  217.  
  218. CF=cf(0,0,0)
  219.  
  220.  
  221.  
  222. local prt1=part(3,modelzorz,0,0,BrickColor.new("Dark orange"),"Slate","Part1",vt(400,10,400),CF)
  223.  
  224. local prt1b=part(3,modelzorz,0,1,BrickColor.new("Dark orange"),"Slate","Part1",vt(0,0,0),CF*cf(0,20,0))
  225.  
  226. light = Instance.new("PointLight")
  227.  
  228. light.Brightness = .8
  229.  
  230. light.Range = 150
  231.  
  232. light.Color = Color3.new(255,255,255)
  233.  
  234. light.Parent=prt1b
  235.  
  236. numb=0
  237.  
  238. numb2=0
  239.  
  240. for i=1,8 do
  241.  
  242. local prt2=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part2",vt(300,15,60),CF*euler(0,numb,0)*cf(0,-numb2,0))
  243.  
  244. numb=numb+0.3925
  245.  
  246. numb2=numb2+0.01
  247.  
  248. end
  249.  
  250. numb=0
  251.  
  252. for i=1,16 do
  253.  
  254. local prt3=part(3,modelzorz,0,0,BrickColor.new("Tr. Red"),"Slate","Part3",vt(100,10,2),CF*euler(0,numb,0)*cf(80,3-0.01,0))
  255.  
  256. numb=numb+0.3925
  257.  
  258. end
  259.  
  260. numb=0
  261.  
  262. for i=1,4 do
  263.  
  264. local prt4=part(3,modelzorz,0,0,BrickColor.new("Tr. Red"),"Slate","Part4",vt(30,11,30),CF*euler(0,numb,0)*cf(80,2.5,0))
  265.  
  266. local prt4b=part(3,modelzorz,0,1,BrickColor.new("Tr. Red"),"Slate","Part4",vt(0,0,0),CF*euler(0,numb,0)*cf(80,2.5+20,0))
  267.  
  268. light = Instance.new("PointLight")
  269.  
  270. light.Brightness = .8
  271.  
  272. light.Range = 50
  273.  
  274. light.Color = Color3.new(50,50,0)
  275.  
  276. light.Parent=prt4b
  277.  
  278. numb2=0
  279.  
  280. for i=1,8 do
  281.  
  282. local prt5=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part5",vt(10,5,5),prt4.CFrame*euler(0,numb2,0)*cf(8,3.5,0))
  283.  
  284. numb2=numb2+0.785
  285.  
  286. end
  287.  
  288. numb=numb+1.57
  289.  
  290. end
  291.  
  292. local prt6=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part6",vt(40,10,40),CF*cf(0,10,0))
  293.  
  294. numb2=0
  295.  
  296. for i=1,4 do
  297.  
  298. numb=0
  299.  
  300. numb3=0
  301.  
  302. for i=1,8 do
  303.  
  304. local prt6=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part6",vt(5,10,20+numb3),CF*euler(0,numb2,0)*cf(-20-numb,9.9-numb,0))
  305.  
  306. numb=numb+1
  307.  
  308. numb3=numb3+0.01
  309.  
  310. end
  311.  
  312. numb2=numb2+1.57
  313.  
  314. end
  315.  
  316. numb=0
  317.  
  318. numb2=0
  319.  
  320. for i=1,8 do
  321.  
  322. local prt7=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part7",vt(15,5,10),CF*euler(0,numb,0)*cf(10,13-numb2,0))
  323.  
  324. numb=numb+0.785
  325.  
  326. numb2=numb2+0.01
  327.  
  328. end
  329.  
  330. numb=0
  331.  
  332. for i=1,16 do
  333.  
  334. if i~=1 and i~=5 and i~=9 and i~=13 then
  335.  
  336. local prt8=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part8",vt(30,12,70),CF*euler(0,numb,0)*cf(-180,10,0))
  337.  
  338. local prt9=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part9",vt(20,13,60),prt8.CFrame)
  339.  
  340. numb2=0
  341.  
  342. for i=1,6 do
  343.  
  344. local prt9b=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part9b",vt(5,31,5),prt8.CFrame*cf(0,0,30+numb2)*euler(0,0,1.57))
  345.  
  346. local prt9c=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part9c",vt(3,32,3),prt9b.CFrame)
  347.  
  348. light = Instance.new("PointLight")
  349.  
  350. light.Brightness = .8
  351.  
  352. light.Range = 30
  353.  
  354. light.Color = Color3.new(255,255,255)
  355.  
  356. light.Parent=prt9c
  357.  
  358. numb2=numb2-10
  359.  
  360. end
  361.  
  362. end
  363.  
  364. numb=numb+0.3925
  365.  
  366. end
  367.  
  368. numb=1.57
  369.  
  370. for i=1,3 do
  371.  
  372. local prt10=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part10",vt(20,13,80),CF*euler(0,numb,0)*cf(-185,10,0))
  373.  
  374. local prt11=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part10",vt(10,14,70),prt10.CFrame)
  375.  
  376. numb2=0
  377.  
  378. for i=1,6 do
  379.  
  380. local prt12=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part12",vt(2,11,80),prt10.CFrame*cf(11-numb2,numb2,0))
  381.  
  382. numb2=numb2-2
  383.  
  384. end
  385.  
  386. numb=numb+1.57
  387.  
  388. end
  389.  
  390. numb=0
  391.  
  392. numb2=0
  393.  
  394. for i=1,39 do
  395.  
  396. if i>=3 then
  397.  
  398. local prt13=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part13",vt(30,10,40),CF*euler(0,numb,0)*cf(-195,20+numb2,0))
  399.  
  400. local prt14=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part14",vt(20,11,30),prt13.CFrame)
  401.  
  402. end
  403.  
  404. numb2=numb2+0.009
  405.  
  406. numb=numb+0.157
  407.  
  408. end
  409.  
  410. numb=0
  411.  
  412. for i=1,40 do
  413.  
  414. local prt15=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part15",vt(30,10,40),CF*euler(0,numb,0)*cf(-220,30.5+numb2,0))
  415.  
  416. numb3=0
  417.  
  418. local prt9b=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part9b",vt(5,35,5),prt15.CFrame*cf(0,0,0)*euler(0,0,1.57))
  419.  
  420. local prt9c=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part9c",vt(3,36,3),prt9b.CFrame)
  421.  
  422. light = Instance.new("PointLight")
  423.  
  424. light.Brightness = .8
  425.  
  426. light.Range = 30
  427.  
  428. light.Color = Color3.new(255,255,255)
  429.  
  430. light.Parent=prt9c
  431.  
  432. local prt16=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part16",vt(29.9,11,39.9),prt15.CFrame)
  433.  
  434. local prt17=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part17",vt(10,3,10),prt15.CFrame*cf(0,6,0))
  435.  
  436. local prt18=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part18",vt(5,5,5),prt15.CFrame)
  437.  
  438. prt18.Shape="Cylinder"
  439.  
  440. prt18.CFrame=prt17.CFrame*cf(0,3,0)*euler(0,0,1.57)
  441.  
  442. local prt19=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part19",vt(10,3,10),prt18.CFrame*euler(0,0,-1.57)*cf(0,3,0))
  443.  
  444. local prt20=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part20",vt(30,10,40),prt19.CFrame*cf(0,6,0))
  445.  
  446. local prt21=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part21",vt(29.9,11,39.9),prt20.CFrame)
  447.  
  448. local prt22=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part22",vt(150,20,40),prt21.CFrame*cf(50,12,0))
  449.  
  450. local prt23=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part23",vt(50,50,90),prt22.CFrame*cf(49,30,0)*euler(0,0,0.5))
  451.  
  452. local prt24=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Slate","Part24",vt(80,20,20),prt23.CFrame*cf(40,10,0))
  453.  
  454. local prt25=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part25",vt(5,40,20),prt24.CFrame*cf(20,0,0))
  455.  
  456. local prt26=part(3,modelzorz,0,0.8,BrickColor.new("Bright blue"),"Plastic","Part26",vt(1,80,20),prt24.CFrame*cf(60,0,0)*euler(0,0,1.07))
  457.  
  458. numb=numb+0.157
  459.  
  460. end
  461.  
  462. numb=0
  463.  
  464. for i=1,6 do
  465.  
  466. local prt27=part(3,modelzorz,0,0,BrickColor.new("Nougat"),"Plastic","Part27",vt(13,50,13),CF*euler(0,numb,0)*cf(120,25,0))
  467.  
  468. local msh27=mesh("CylinderMesh",prt27,"","",vt(0,0,0),vt(1,1,1))
  469.  
  470. local prt28=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part28",vt(15,15,15),CF*euler(0,numb,0)*cf(120,10,0))
  471.  
  472. local prt29=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part29",vt(10,16,10),prt28.CFrame*euler(1.57,0.785,0))
  473.  
  474. local prt30=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part30",vt(10,16,10),prt28.CFrame*euler(0.785,0,1.57))
  475.  
  476. numb2=0
  477.  
  478. for i=1,6 do
  479.  
  480. local prt31=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part31",vt(15,50,1),prt27.CFrame*euler(0,numb2,0))
  481.  
  482. numb2=numb2+0.785
  483.  
  484. end
  485.  
  486. local prt32=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Part32",vt(15,15,15),CF*euler(0,numb,0)*cf(120,47.5,0))
  487.  
  488. local prt33=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part33",vt(10,16,10),prt32.CFrame*euler(1.57,0.785,0))
  489.  
  490. local prt34=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part34",vt(10,16,10),prt32.CFrame*euler(0.785,0,1.57))
  491.  
  492. local spawn = Instance.new("SpawnLocation")
  493.  
  494. light = Instance.new("PointLight")
  495.  
  496. light.Brightness = .8
  497.  
  498. light.Range = 100
  499.  
  500. light.Parent=spawn
  501.  
  502. spawn.Parent = modelzorz
  503.  
  504. spawn.CanCollide = false
  505.  
  506. spawn.Anchored = true
  507.  
  508. spawn.Transparency = 1
  509.  
  510. spawn.CFrame=CF*euler(0,numb,0)*cf(140,0,0)
  511.  
  512. numb=numb+1.04666666
  513.  
  514. end
  515.  
  516. local prt35=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part35",vt(60,30,40),CF*cf(-180,15,30))
  517.  
  518. local prt35a=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part35a",vt(10,20,5),CF*cf(-150,15,15))
  519.  
  520. local prt36=part(3,modelzorz,0,0,BrickColor.new("Earth green"),"Slate","Part36",vt(60,30,40),CF*cf(-180,15,-30))
  521.  
  522. local prt3ba=part(3,modelzorz,0,0,BrickColor.new("Earth yellow"),"Slate","Part3ba",vt(10,20,5),CF*cf(-150,15,-15))
  523.  
  524.  
  525.  
  526. local Torso1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Torso",vt(2,2,1),CF*cf(-155,33,-15)*euler(0,1.57,0))
  527.  
  528. local LArm1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Left Arm",vt(1,2,1),Torso1.CFrame*cf(0.8,0,0.5+0.2)*euler(-1,0,-1))
  529.  
  530. local RArm1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Reft Arm",vt(1,2,1),Torso1.CFrame*cf(-0.8,0,0.5+0.2)*euler(-1,0,1))
  531.  
  532. local LLeg1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Left Leg",vt(1,2,1),Torso1.CFrame*cf(0.5,-2,0))
  533.  
  534. local RLeg1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Right Leg",vt(1,2,1),Torso1.CFrame*cf(-0.5,-2,0))
  535.  
  536. local Head1=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Head",vt(1,1,1),Torso1.CFrame*cf(0,1.5,0))
  537.  
  538.  
  539.  
  540. local Torso2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Torso",vt(2,2,1),CF*cf(-155,33,15)*euler(0,1.57,0))
  541.  
  542. local LArm2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Left Arm",vt(1,2,1),Torso2.CFrame*cf(0.8,0,0.5+0.2)*euler(-1,0,-1))
  543.  
  544. local RArm2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Reft Arm",vt(1,2,1),Torso2.CFrame*cf(-0.8,0,0.5+0.2)*euler(-1,0,1))
  545.  
  546. local LLeg2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Left Leg",vt(1,2,1),Torso2.CFrame*cf(0.5,-2,0))
  547.  
  548. local RLeg2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Right Leg",vt(1,2,1),Torso2.CFrame*cf(-0.5,-2,0))
  549.  
  550. local Head2=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Slate","Head",vt(1,1,1),Torso2.CFrame*cf(0,1.5,0))
  551.  
  552.  
  553.  
  554. print("truta193's Clockwork Arena loaded.")
  555.  
  556. --workspace.Fenrier.Torso.CFrame=teleprt2.CFrame*cf(0,150,0)
  557.  
  558.  
  559. --truta193
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement