Advertisement
Zach_script_stealer2

Draw FE XD

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