Advertisement
doryna2281337

Untitled

Aug 21st, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.37 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,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. --Converted with ttyyuu12345's model to script plugin v4
  85. function sandbox(var,func)
  86. local env = getfenv(func)
  87. local newenv = setmetatable({},{
  88. __index = function(self,k)
  89. if k=="script" then
  90. return var
  91. else
  92. return env[k]
  93. end
  94. end,
  95. })
  96. setfenv(func,newenv)
  97. return func
  98. end
  99. cors = {}
  100. mas = Instance.new("Model",game:GetService("Lighting"))
  101. Sky0 = Instance.new("Sky")
  102. Sky0.Name = "Golden Cosmos"
  103. Sky0.Parent = mas
  104. Sky0.CelestialBodiesShown = false
  105. Sky0.SkyboxBk = "http://www.roblox.com/asset/?id=357881754"
  106. Sky0.SkyboxDn = "http://www.roblox.com/asset/?id=357882053"
  107. Sky0.SkyboxFt = "http://www.roblox.com/asset/?id=357882321"
  108. Sky0.SkyboxLf = "http://www.roblox.com/asset/?id=357882644"
  109. Sky0.SkyboxRt = "http://www.roblox.com/asset/?id=357883014"
  110. Sky0.SkyboxUp = "http://www.roblox.com/asset/?id=357883321"
  111. Sky0.StarCount = 0
  112. for i,v in pairs(mas:GetChildren()) do
  113. v.Parent = game:GetService("Lighting")
  114. pcall(function() v:MakeJoints() end)
  115. end
  116. mas:Destroy()
  117. for i,v in pairs(cors) do
  118. spawn(function()
  119. pcall(v)
  120. end)
  121. end
  122.  
  123.  
  124. --Converted with ttyyuu12345's model to script plugin v4
  125. function sandbox(var,func)
  126. local env = getfenv(func)
  127. local newenv = setmetatable({},{
  128. __index = function(self,k)
  129. if k=="script" then
  130. return var
  131. else
  132. return env[k]
  133. end
  134. end,
  135. })
  136. setfenv(func,newenv)
  137. return func
  138. end
  139. cors = {}
  140. mas = Instance.new("Model",game:GetService("Lighting"))
  141. Model0 = Instance.new("Model")
  142. Part1 = Instance.new("Part")
  143. SpecialMesh2 = Instance.new("SpecialMesh")
  144. Script3 = Instance.new("Script")
  145. RotateP4 = Instance.new("RotateP")
  146. RotateP5 = Instance.new("RotateP")
  147. ManualWeld6 = Instance.new("ManualWeld")
  148. Sound7 = Instance.new("Sound")
  149. Part8 = Instance.new("Part")
  150. Part9 = Instance.new("Part")
  151. Script10 = Instance.new("Script")
  152. SpecialMesh11 = Instance.new("SpecialMesh")
  153. Decal12 = Instance.new("Decal")
  154. Decal13 = Instance.new("Decal")
  155. Decal14 = Instance.new("Decal")
  156. Decal15 = Instance.new("Decal")
  157. Decal16 = Instance.new("Decal")
  158. Decal17 = Instance.new("Decal")
  159. Script18 = Instance.new("Script")
  160. Script19 = Instance.new("Script")
  161. Script20 = Instance.new("Script")
  162. Model0.Parent = mas
  163. Part1.Name = "Head"
  164. Part1.Parent = Model0
  165. Part1.CFrame = CFrame.new(-26.0499973, 378.549988, 23.5499992, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  166. Part1.Orientation = Vector3.new(-90, 0, 0)
  167. Part1.Position = Vector3.new(-26.0499973, 378.549988, 23.5499992)
  168. Part1.Rotation = Vector3.new(-90, 0, 0)
  169. Part1.Transparency = 0.0099999997764826
  170. Part1.Size = Vector3.new(40, 35, 1)
  171. Part1.Anchored = true
  172. Part1.BottomSurface = Enum.SurfaceType.Smooth
  173. Part1.CanCollide = false
  174. Part1.TopSurface = Enum.SurfaceType.Smooth
  175. Part1.FormFactor = Enum.FormFactor.Symmetric
  176. Part1.formFactor = Enum.FormFactor.Symmetric
  177. SpecialMesh2.Name = "planar1"
  178. SpecialMesh2.Parent = Part1
  179. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1185246"
  180. SpecialMesh2.Scale = Vector3.new(200, 200, 0)
  181. SpecialMesh2.VertexColor = Vector3.new(1, 1, 0)
  182. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=21315275"
  183. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  184. Script3.Name = "spin"
  185. Script3.Parent = Part1
  186. table.insert(cors,sandbox(Script3,function()
  187. spinning = script.Parent
  188.  
  189. while true do
  190. spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(0), 0.99)
  191. wait(0.00)
  192. end
  193.  
  194. end))
  195. RotateP4.Name = "INfecTION"
  196. RotateP4.Parent = Part1
  197. RotateP4.BaseAngle = 0.25
  198. RotateP5.Name = "LOLWUT!!?"
  199. RotateP5.Parent = Part1
  200. RotateP5.BaseAngle = 0.25
  201. ManualWeld6.Name = "Head-to-H Strong Joint"
  202. ManualWeld6.Parent = Part1
  203. ManualWeld6.C0 = CFrame.new(20, -17.5, -0.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  204. ManualWeld6.C1 = CFrame.new(29, -36.5, 15.5, 0, 0, -1, 1, 0, 0, 0, -1, 0)
  205. ManualWeld6.Part0 = Part1
  206. ManualWeld6.Part1 = nil
  207. ManualWeld6.part1 = nil
  208. Sound7.Parent = Model0
  209. Sound7.Looped = true
  210. Sound7.Playing = true
  211. Sound7.SoundId = "rbxassetid://1836465715"
  212. Part8.Parent = Model0
  213. Part8.Color = Color3.new(1, 1, 0)
  214. Part8.Size = Vector3.new(512, 20, 512)
  215. Part8.Anchored = true
  216. Part8.BrickColor = BrickColor.new("New Yeller")
  217. Part8.Locked = true
  218. Part8.Material = Enum.Material.ForceField
  219. Part8.brickColor = BrickColor.new("New Yeller")
  220. Part8.FormFactor = Enum.FormFactor.Symmetric
  221. Part8.formFactor = Enum.FormFactor.Symmetric
  222. Part9.Name = "Spinning Black Hole"
  223. Part9.Parent = Model0
  224. Part9.CFrame = CFrame.new(61, 47, -555, -0, 0, -1, -1, 0, -0, -0, 1, -0)
  225. Part9.Orientation = Vector3.new(0, -90, -90)
  226. Part9.Position = Vector3.new(61, 47, -555)
  227. Part9.Rotation = Vector3.new(90, -90, 0)
  228. Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  229. Part9.Size = Vector3.new(94, 94, 94)
  230. Part9.Anchored = true
  231. Part9.BottomSurface = Enum.SurfaceType.Smooth
  232. Part9.BrickColor = BrickColor.new("Really black")
  233. Part9.TopSurface = Enum.SurfaceType.Smooth
  234. Part9.brickColor = BrickColor.new("Really black")
  235. Part9.Shape = Enum.PartType.Ball
  236. Script10.Parent = Part9
  237. table.insert(cors,sandbox(Script10,function()
  238. local hole = script.Parent
  239. local childList = {}
  240.  
  241. local massConstant = 5.8
  242.  
  243. local mass = 32000 * massConstant
  244.  
  245.  
  246. function checkObject(obj)
  247. if (obj ~= hole) and (obj.className == "Part") then
  248. if (obj.Anchored == false) then
  249. table.insert(childList, 1, obj)
  250. end
  251. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  252. local child = obj:GetChildren()
  253. for x = 1, #child do
  254. checkObject(child[x])
  255. end
  256. obj.ChildAdded:connect(checkObject)
  257. end
  258. end
  259.  
  260. checkObject(workspace)
  261.  
  262. print("Black Hole script loaded.")
  263.  
  264. local n = 0
  265. while true do
  266. if n < #childList then
  267. n = n + 1
  268. if n % 800 == 0 then
  269. wait()
  270. end
  271. else
  272. n = 1
  273. wait()
  274. end
  275.  
  276. local child = childList[n]
  277. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  278. local relPos = hole.Position - child.Position
  279. local motivator = child:FindFirstChild("BlackHole Influence")
  280. if relPos.magnitude * 240 * massConstant < mass then
  281. child:BreakJoints()
  282. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  283. mass = mass + child:GetMass()
  284. child:Remove()
  285. table.remove(childList, n)
  286. n = n - 1
  287. else
  288. child.CanCollide = false
  289. if motivator == nil then
  290. motivator = Instance.new("BodyPosition")
  291. motivator.Parent = child
  292. motivator.Name = "BlackHole Influence"
  293. end
  294. motivator.position = hole.Position
  295. motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  296. end
  297. elseif motivator ~= nil then
  298. motivator:Remove()
  299. end
  300. end
  301. end
  302. end))
  303. SpecialMesh11.Parent = Part9
  304. SpecialMesh11.MeshType = Enum.MeshType.Sphere
  305. Decal12.Parent = Part9
  306. Decal12.Texture = "http://www.roblox.com/asset/?id=8860777"
  307. Decal12.Face = Enum.NormalId.Back
  308. Decal13.Parent = Part9
  309. Decal13.Texture = "http://www.roblox.com/asset/?id=8860777"
  310. Decal13.Face = Enum.NormalId.Top
  311. Decal14.Parent = Part9
  312. Decal14.Texture = "http://www.roblox.com/asset/?id=8860777"
  313. Decal14.Face = Enum.NormalId.Right
  314. Decal15.Parent = Part9
  315. Decal15.Texture = "http://www.roblox.com/asset/?id=8860777"
  316. Decal16.Parent = Part9
  317. Decal16.Texture = "http://www.roblox.com/asset/?id=8860777"
  318. Decal16.Face = Enum.NormalId.Left
  319. Decal17.Parent = Part9
  320. Decal17.Texture = "http://www.roblox.com/asset/?id=8860777"
  321. Decal17.Face = Enum.NormalId.Bottom
  322. Script18.Name = "Spin"
  323. Script18.Parent = Part9
  324. table.insert(cors,sandbox(Script18,function()
  325. while true do
  326. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.1,0)
  327. wait(0.01)
  328. end
  329.  
  330. end))
  331. Script19.Name = "Spin"
  332. Script19.Parent = Part9
  333. table.insert(cors,sandbox(Script19,function()
  334. while true do
  335. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(-0.1,0,0)
  336. wait(0.01)
  337. end
  338.  
  339. end))
  340. Script20.Name = "Spin"
  341. Script20.Parent = Part9
  342. table.insert(cors,sandbox(Script20,function()
  343. while true do
  344. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0.1)
  345. wait(0.01)
  346. end
  347.  
  348. end))
  349. for i,v in pairs(mas:GetChildren()) do
  350. v.Parent = workspace
  351. pcall(function() v:MakeJoints() end)
  352. end
  353. mas:Destroy()
  354. for i,v in pairs(cors) do
  355. spawn(function()
  356. pcall(v)
  357. end)
  358. end
  359.  
  360. local Factor = 300
  361.  
  362. function AddGravity(Part)
  363. local Gravity = Part:findFirstChild("BodyForce")
  364. if Gravity ~= nil then
  365. return
  366. end
  367. local Gravity = Instance.new("BodyForce")
  368. Gravity.Parent = Part
  369. Gravity.force = Vector3.new(0,Factor * Part:GetMass(),0)
  370. end
  371.  
  372. function GetClass(Root)
  373. if Root.className == "Part" or Root.className == "Seat" or Root.className == "SpawnLocation" or Root.className == "FlagStand" then
  374. AddGravity(Root)
  375. end
  376. local Parts = Root:GetChildren()
  377. for X = 1, # Parts do
  378. GetClass(Parts[X])
  379. end
  380. Root.ChildAdded:connect(function(Child)
  381. GetClass(Child)
  382. end)
  383. end
  384.  
  385. GetClass(script.Parent)
  386.  
  387.  
  388. --Converted with ttyyuu12345's model to script plugin v4
  389. function sandbox(var,func)
  390. local env = getfenv(func)
  391. local newenv = setmetatable({},{
  392. __index = function(self,k)
  393. if k=="script" then
  394. return var
  395. else
  396. return env[k]
  397. end
  398. end,
  399. })
  400. setfenv(func,newenv)
  401. return func
  402. end
  403. cors = {}
  404. mas = Instance.new("Model",game:GetService("Lighting"))
  405. Model0 = Instance.new("Model")
  406. Part1 = Instance.new("Part")
  407. ManualWeld2 = Instance.new("ManualWeld")
  408. ManualWeld3 = Instance.new("ManualWeld")
  409. Part4 = Instance.new("Part")
  410. ManualWeld5 = Instance.new("ManualWeld")
  411. Part6 = Instance.new("Part")
  412. SurfaceGui7 = Instance.new("SurfaceGui")
  413. TextLabel8 = Instance.new("TextLabel")
  414. Model0.Name = "Sign"
  415. Model0.Parent = mas
  416. Part1.Parent = Model0
  417. Part1.CFrame = CFrame.new(44.0347366, 12.3999844, -16.8969593, -0.984808087, 0, 0.173646957, 0, 1, 0, -0.173646957, 0, -0.984808087)
  418. Part1.Orientation = Vector3.new(0, 170, 0)
  419. Part1.Position = Vector3.new(44.0347366, 12.3999844, -16.8969593)
  420. Part1.Rotation = Vector3.new(-180, 10, -180)
  421. Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
  422. Part1.Size = Vector3.new(0.400000006, 4.80000019, 0.200000003)
  423. Part1.BrickColor = BrickColor.new("Reddish brown")
  424. Part1.Material = Enum.Material.WoodPlanks
  425. Part1.brickColor = BrickColor.new("Reddish brown")
  426. ManualWeld2.Name = "Part-to-Part Strong Joint"
  427. ManualWeld2.Parent = Part1
  428. ManualWeld2.C0 = CFrame.new(0.200000003, -2.4000001, -0.100000001, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  429. ManualWeld2.C1 = CFrame.new(0.199996948, -3.5, 0.100006104, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  430. ManualWeld2.Part0 = Part1
  431. ManualWeld2.Part1 = Part4
  432. ManualWeld2.part1 = Part4
  433. ManualWeld3.Name = "Part Terrain Joint"
  434. ManualWeld3.Parent = Part1
  435. ManualWeld3.Part1 = Part1
  436. ManualWeld3.part1 = Part1
  437. Part4.Parent = Model0
  438. Part4.CFrame = CFrame.new(44.0000038, 13.4999847, -16.6999931, -0.984808087, 0, 0.173646957, 0, 1, 0, -0.173646957, 0, -0.984808087)
  439. Part4.Orientation = Vector3.new(0, 170, 0)
  440. Part4.Position = Vector3.new(44.0000038, 13.4999847, -16.6999931)
  441. Part4.Rotation = Vector3.new(-180, 10, -180)
  442. Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
  443. Part4.Size = Vector3.new(4, 2.20000005, 0.200000003)
  444. Part4.BrickColor = BrickColor.new("Reddish brown")
  445. Part4.Material = Enum.Material.WoodPlanks
  446. Part4.brickColor = BrickColor.new("Reddish brown")
  447. ManualWeld5.Name = "Part-to-Text Strong Joint"
  448. ManualWeld5.Parent = Part4
  449. ManualWeld5.C0 = CFrame.new(2, -1.10000002, -0.100000001, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  450. ManualWeld5.C1 = CFrame.new(2.01499939, -1.10499954, 0.100006104, -1.00000012, 0, -5.96046448e-08, 0, 1, 0, 5.96046448e-08, 0, -1.00000012)
  451. ManualWeld5.Part0 = Part4
  452. ManualWeld5.Part1 = Part6
  453. ManualWeld5.part1 = Part6
  454. Part6.Name = "Text"
  455. Part6.Parent = Model0
  456. Part6.CFrame = CFrame.new(43.9800453, 13.5049839, -16.5004215, -0.984807968, 0, 0.173647001, 0, 1, 0, -0.173647001, 0, -0.984807968)
  457. Part6.Orientation = Vector3.new(0, 170, 0)
  458. Part6.Position = Vector3.new(43.9800453, 13.5049839, -16.5004215)
  459. Part6.Rotation = Vector3.new(-180, 10, -180)
  460. Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
  461. Part6.Size = Vector3.new(3.97000051, 2.21000004, 0.200000003)
  462. Part6.Anchored = true
  463. Part6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  464. Part6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  465. Part6.BrickColor = BrickColor.new("Reddish brown")
  466. Part6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  467. Part6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  468. Part6.Material = Enum.Material.WoodPlanks
  469. Part6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  470. Part6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  471. Part6.brickColor = BrickColor.new("Reddish brown")
  472. Part6.FormFactor = Enum.FormFactor.Custom
  473. Part6.formFactor = Enum.FormFactor.Custom
  474. SurfaceGui7.Parent = Part6
  475. SurfaceGui7.CanvasSize = Vector2.new(200, 100)
  476. TextLabel8.Parent = SurfaceGui7
  477. TextLabel8.Size = UDim2.new(1, 0, 1, 0)
  478. TextLabel8.Active = true
  479. TextLabel8.BackgroundColor = BrickColor.new("Institutional white")
  480. TextLabel8.BackgroundColor3 = Color3.new(1, 1, 1)
  481. TextLabel8.BackgroundTransparency = 1
  482. TextLabel8.Font = Enum.Font.ArialBold
  483. TextLabel8.FontSize = Enum.FontSize.Size12
  484. TextLabel8.Text = "planetary map by xdielivex"
  485. TextLabel8.TextColor = BrickColor.new("Institutional white")
  486. TextLabel8.TextColor3 = Color3.new(1, 1, 1)
  487. TextLabel8.TextScaled = true
  488. TextLabel8.TextSize = 12
  489. TextLabel8.TextStrokeColor3 = Color3.new(0, 0.0117647, 0)
  490. TextLabel8.TextStrokeTransparency = 0
  491. TextLabel8.TextWrap = true
  492. TextLabel8.TextWrapped = true
  493. for i,v in pairs(mas:GetChildren()) do
  494. v.Parent = workspace
  495. pcall(function() v:MakeJoints() end)
  496. end
  497. mas:Destroy()
  498. for i,v in pairs(cors) do
  499. spawn(function()
  500. pcall(v)
  501. end)
  502. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement