Advertisement
zXzGamePROzXz

Untitled

Dec 30th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.02 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6.  
  7. -- Extracted from nebula hub by DOGGΩ#0018
  8. me = game.Players.zXzGamePROzXz
  9.  
  10. char = me.Character
  11.  
  12. hold = false
  13.  
  14. thickness = 0.1
  15.  
  16. maxt = 10
  17.  
  18. bricks = {}
  19.  
  20.  
  21.  
  22. color = BrickColor.new("Black")
  23.  
  24. colors = {}
  25.  
  26. for i=0,63,1 do
  27.  
  28. table.insert(colors, BrickColor.palette(i))
  29.  
  30. end
  31.  
  32.  
  33.  
  34. function checkt()
  35.  
  36. if thickness < 0.1 then
  37.  
  38. thickness = 0.1
  39.  
  40. end
  41.  
  42. if thickness > maxt then
  43.  
  44. thickness = maxt
  45.  
  46. end
  47.  
  48. end
  49.  
  50.  
  51.  
  52. function makegui()
  53.  
  54. local maxx = 200
  55.  
  56. local x = 0
  57.  
  58. local y = 0
  59.  
  60. local g = Instance.new("ScreenGui")
  61.  
  62. g.Name = "Colors"
  63.  
  64. local fr = Instance.new("Frame",g)
  65.  
  66. fr.Position = UDim2.new(0, 10, 0.3, 0)
  67.  
  68. fr.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  69.  
  70. fr.BorderColor3 = Color3.new(0,0,0)
  71.  
  72. local txt = nil
  73.  
  74. local txt2 = nil
  75.  
  76. local txt3 = nil
  77.  
  78. for i,v in pairs(colors) do
  79.  
  80. local gah = Instance.new("TextButton",fr)
  81.  
  82. gah.Position = UDim2.new(0, x + 3, 0, y + 3)
  83.  
  84. gah.Size = UDim2.new(0, 25, 0, 25)
  85.  
  86. gah.BackgroundColor = v
  87.  
  88. gah.BorderColor3 = Color3.new(0,0,0)
  89.  
  90. gah.Text = ""
  91.  
  92. gah.MouseButton1Down:connect(function()
  93.  
  94. color = v
  95.  
  96. txt.Text = v.Name
  97.  
  98. end)
  99.  
  100. gah.MouseEnter:connect(function()
  101.  
  102. txt2.Text = v.Name
  103.  
  104. end)
  105.  
  106. gah.MouseLeave:connect(function() txt2.Text = ""
  107.  
  108. end)
  109.  
  110. x = x + 28
  111.  
  112. if x >= maxx then
  113.  
  114. x = 0
  115.  
  116. y = y + 28
  117.  
  118. end
  119.  
  120. end
  121.  
  122. fr.Size = UDim2.new(0, maxx + 27, 0, y + 40)
  123.  
  124. txt = Instance.new("TextLabel",fr)
  125.  
  126. txt.Size = UDim2.new(0.95, 0, 0, 35)
  127.  
  128. txt.Position = UDim2.new(0.025, 0, 0, y + 3)
  129.  
  130. txt.Text = color.Name
  131.  
  132. txt.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  133.  
  134. txt.BorderColor3 = Color3.new(0, 0, 0)
  135.  
  136. txt.TextColor3 = Color3.new(1, 1, 1)
  137.  
  138. txt.FontSize = "Size24"
  139.  
  140. txt.Font = "ArialBold"
  141.  
  142. txt.TextYAlignment = "Bottom"
  143.  
  144. txt.TextXAlignment = "Left"
  145.  
  146. txt2 = Instance.new("TextLabel",txt)
  147.  
  148. txt2.Size = UDim2.new(1, 0, 0, 0)
  149.  
  150. txt2.Text = color.Name
  151.  
  152. txt2.BackgroundTransparency = 1
  153.  
  154. txt2.TextColor3 = Color3.new(1, 1, 1)
  155.  
  156. txt2.FontSize = "Size12"
  157.  
  158. txt2.TextYAlignment = "Top"
  159.  
  160. txt2.TextXAlignment = "Right"
  161.  
  162. txt3 = Instance.new("TextLabel",fr)
  163.  
  164. txt3.Size = UDim2.new(0.5, 0, 0, 25)
  165.  
  166. txt3.Position = UDim2.new(0.25, 0, 1, 0)
  167.  
  168. txt3.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  169.  
  170. txt3.BorderColor3 = Color3.new(0,0,0)
  171.  
  172. txt3.TextColor3 = Color3.new(1,1,1)
  173.  
  174. txt3.FontSize = "Size12"
  175.  
  176. txt3.Text = thickness
  177.  
  178. g.Parent = me.PlayerGui
  179.  
  180. coroutine.resume(coroutine.create(function()
  181.  
  182. while g.Parent ~= nil do
  183.  
  184. txt3.Text = thickness
  185.  
  186. wait()
  187.  
  188. end
  189.  
  190. end))
  191.  
  192. end
  193.  
  194.  
  195.  
  196. function remgui()
  197.  
  198. for i,v in pairs(me.PlayerGui:children()) do
  199.  
  200. if v.Name == "Colors" then v:remove() end
  201.  
  202. end
  203.  
  204. end
  205.  
  206.  
  207.  
  208. if script.Parent.className ~= "HopperBin" then
  209.  
  210. h = Instance.new("HopperBin",me.Backpack)
  211.  
  212. h.Name = "Draw"
  213.  
  214. script.Parent = h
  215.  
  216. end
  217.  
  218.  
  219.  
  220. bin = script.Parent
  221.  
  222.  
  223.  
  224. function weld(p1, p2)
  225.  
  226. local w = Instance.new("Weld")
  227.  
  228. w.Part0 = p2
  229.  
  230. w.Part1 = p1
  231.  
  232. w.C0 = p2.CFrame:toObjectSpace(p1.CFrame)
  233.  
  234. w.Parent = p2
  235.  
  236. end
  237.  
  238.  
  239.  
  240. function B1D(mouse)
  241.  
  242. hold = true
  243.  
  244. coroutine.resume(coroutine.create(function()
  245.  
  246. mouse.Button1Up:wait()
  247.  
  248. hold = false
  249.  
  250. end))
  251.  
  252. local p = Instance.new("Part",char)
  253.  
  254. p.formFactor = "Custom"
  255.  
  256. p.Size = Vector3.new(1,0.5,0.5)
  257.  
  258. p.Anchored = true
  259.  
  260. p.TopSurface = 0
  261.  
  262. p.BottomSurface = 0
  263.  
  264. p.CanCollide = false
  265.  
  266. p.BrickColor = color
  267.  
  268. p.Locked = true
  269.  
  270. local m = Instance.new("BlockMesh",p)
  271.  
  272. local targ = mouse.Target
  273.  
  274. table.insert(bricks, p)
  275.  
  276. local pos = mouse.Hit.p
  277.  
  278. while hold do
  279.  
  280. local mag = (pos - mouse.Hit.p).magnitude
  281.  
  282. m.Scale = Vector3.new(thickness, 0.4, (mag+(thickness/3))*2)
  283.  
  284. p.CFrame = CFrame.new(pos, mouse.Hit.p) * CFrame.new(0, 0, -mag/2 - thickness/5)
  285.  
  286. if mag > thickness/2+0.1 then
  287.  
  288. B1D(mouse)
  289.  
  290. if targ ~= nil then
  291.  
  292. if targ.Anchored == false then
  293.  
  294. p.Anchored = false
  295.  
  296. weld(p, targ)
  297.  
  298. end
  299.  
  300. end
  301.  
  302. break
  303.  
  304. end
  305.  
  306. wait()
  307.  
  308. end
  309.  
  310. end
  311.  
  312.  
  313.  
  314. bin.Selected:connect(function(mouse)
  315.  
  316. makegui()
  317.  
  318. mouse.KeyDown:connect(function(key)
  319.  
  320. key = key:lower()
  321.  
  322. local kh = true
  323.  
  324. coroutine.resume(coroutine.create(function()
  325.  
  326. mouse.KeyUp:wait()
  327.  
  328. kh = false
  329.  
  330. end))
  331.  
  332. if key == "q" then
  333.  
  334. while kh do
  335.  
  336. thickness = thickness - 0.1
  337.  
  338. checkt()
  339.  
  340. wait()
  341.  
  342. end
  343.  
  344. elseif key == "e" then
  345.  
  346. while kh do
  347.  
  348. thickness = thickness + 0.1
  349.  
  350. checkt()
  351.  
  352. wait()
  353.  
  354. end
  355.  
  356. elseif key == "z" then
  357.  
  358. while kh do
  359.  
  360. if #bricks > 0 then
  361.  
  362. bricks[#bricks]:remove()
  363.  
  364. table.remove(bricks, #bricks)
  365.  
  366. end
  367.  
  368. wait()
  369.  
  370. end
  371.  
  372. elseif key == "f" then
  373.  
  374. for i = #bricks, 1, -1 do
  375.  
  376. bricks[i]:remove()
  377.  
  378. table.remove(bricks, i)
  379.  
  380. end
  381.  
  382. end
  383.  
  384. end)
  385.  
  386. mouse.Button1Down:connect(function()
  387.  
  388. B1D(mouse)
  389.  
  390. end)
  391.  
  392. end)
  393.  
  394.  
  395.  
  396. bin.Deselected:connect(function()
  397.  
  398. remgui()
  399.  
  400. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement