13242

Untitled

Dec 9th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.21 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. -- Objects
  8. MIDI = Instance.new("ScreenGui")
  9. Frame = Instance.new("Frame")
  10. ID = Instance.new("TextBox")
  11. Play = Instance.new("TextButton")
  12. Dark = Instance.new("TextButton")
  13. Bright = Instance.new("TextButton")
  14. Stop = Instance.new("TextButton")
  15. Hide = Instance.new("TextButton")
  16. Set = Instance.new("TextButton")
  17. BColor = Instance.new("TextBox")
  18. Random = Instance.new("TextButton")
  19. Material = Instance.new("TextBox")
  20. Trans = Instance.new("TextBox")
  21. sound = Instance.new("Sound",game.Players.LocalPlayer.Character.Torso)
  22. sound.Volume = 4
  23. sound.Looped = true
  24. BVal = "Deep orange"
  25. MVal = "Neon"
  26. TVal = 0
  27. Active = false
  28.  
  29. -- Properties
  30.  
  31. MIDI.Name = "MIDI"
  32. MIDI.Parent = game.Players.LocalPlayer.PlayerGui
  33.  
  34. Frame.Parent = MIDI
  35. Frame.Active = true
  36. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  37. Frame.BackgroundTransparency = 0.5799999833107
  38. Frame.BorderSizePixel = 0
  39. Frame.Draggable = true
  40. Frame.Position = UDim2.new(0, 300, 0, 50)
  41. Frame.Size = UDim2.new(0, 310, 0, 200)
  42.  
  43. ID.Name = "ID"
  44. ID.Parent = Frame
  45. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  46. ID.BorderSizePixel = 0
  47. ID.Position = UDim2.new(0, 100, 0, 10)
  48. ID.Size = UDim2.new(0, 120, 0, 30)
  49. ID.Font = Enum.Font.Arcade
  50. ID.FontSize = Enum.FontSize.Size18
  51. ID.Text = "639837244"
  52. ID.TextColor3 = Color3.new(0, 0, 0)
  53. ID.TextSize = 18
  54.  
  55. Material.Name = "Material"
  56. Material.Parent = Frame
  57. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  58. Material.BorderSizePixel = 0
  59. Material.Position = UDim2.new(0, 210, 0, 95)
  60. Material.Size = UDim2.new(0, 90, 0, 15)
  61. Material.Font = Enum.Font.Arcade
  62. Material.FontSize = Enum.FontSize.Size14
  63. Material.Text = "Neon"
  64. Material.TextSize = 14
  65.  
  66. Trans.Name = "Trans"
  67. Trans.Parent = Frame
  68. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  69. Trans.BorderSizePixel = 0
  70. Trans.Position = UDim2.new(0, 210, 0, 75)
  71. Trans.Size = UDim2.new(0, 90, 0, 15)
  72. Trans.Font = Enum.Font.Arcade
  73. Trans.FontSize = Enum.FontSize.Size14
  74. Trans.Text = "Transparency"
  75. Trans.TextSize = 14
  76.  
  77. Set.Name = "Set"
  78. Set.Parent = Frame
  79. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  80. Set.BorderSizePixel = 0
  81. Set.Position = UDim2.new(0, 210, 0, 135)
  82. Set.Size = UDim2.new(0, 90, 0, 15)
  83. Set.Font = Enum.Font.Arcade
  84. Set.FontSize = Enum.FontSize.Size14
  85. Set.Text = "Set"
  86. Set.TextSize = 14
  87. Set.MouseButton1Down:connect(function()
  88. if Active == true then
  89. Active = false
  90. end
  91. BVal = tostring(BColor.Text)
  92. TVal = tonumber(Trans.Text)
  93. MVal = tostring(Material.Text)
  94. end)
  95.  
  96. BColor.Name = "BColor"
  97. BColor.Parent = Frame
  98. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  99. BColor.BorderSizePixel = 0
  100. BColor.Position = UDim2.new(0, 210, 0, 115)
  101. BColor.Size = UDim2.new(0, 90, 0, 15)
  102. BColor.Font = Enum.Font.Arcade
  103. BColor.FontSize = Enum.FontSize.Size14
  104. BColor.Text = "Lime Green"
  105. BColor.TextSize = 14
  106.  
  107. Random.Name = "Random"
  108. Random.Parent = Frame
  109. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  110. Random.BorderSizePixel = 0
  111. Random.Position = UDim2.new(0, 10, 0, 80)
  112. Random.Size = UDim2.new(0, 90, 0, 30)
  113. Random.Font = Enum.Font.Arcade
  114. Random.FontSize = Enum.FontSize.Size14
  115. Random.Text = "Random"
  116. Random.TextSize = 14
  117. Random.MouseButton1Down:connect(function()
  118. if Active == false then
  119. Active = true
  120. end
  121. end)
  122.  
  123. Play.Name = "Play"
  124. Play.Parent = Frame
  125. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  126. Play.BorderSizePixel = 0
  127. Play.Position = UDim2.new(0, 10, 0, 160)
  128. Play.Size = UDim2.new(0, 90, 0, 30)
  129. Play.Font = Enum.Font.Arcade
  130. Play.FontSize = Enum.FontSize.Size14
  131. Play.Text = "Play"
  132. Play.TextSize = 14
  133. Play.MouseButton1Down:connect(function()
  134. sound.TimePosition = 0
  135. sound.Playing = true
  136. sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  137. end)
  138.  
  139. Dark.Name = "Dark"
  140. Dark.Parent = Frame
  141. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  142. Dark.BorderSizePixel = 0
  143. Dark.Position = UDim2.new(0, 10, 0, 120)
  144. Dark.Size = UDim2.new(0, 90, 0, 30)
  145. Dark.Font = Enum.Font.Arcade
  146. Dark.FontSize = Enum.FontSize.Size14
  147. Dark.Text = "Dark"
  148. Dark.TextSize = 14
  149. Dark.MouseButton1Down:connect(function()
  150. game.Lighting.TimeOfDay = 0
  151. game.Lighting.GlobalShadows = false
  152. game.Lighting.Ambient = Color3.new(0,0,0)
  153. game.Lighting.Brightness = 0
  154. end)
  155.  
  156. Bright.Name = "Bright"
  157. Bright.Parent = Frame
  158. Bright.BackgroundColor3 = Color3.new(1, 1, 1)
  159. Bright.BorderSizePixel = 0
  160. Bright.Position = UDim2.new(0, 110, 0, 120)
  161. Bright.Size = UDim2.new(0, 90, 0, 30)
  162. Bright.Font = Enum.Font.Arcade
  163. Bright.FontSize = Enum.FontSize.Size14
  164. Bright.Text = "Bright"
  165. Bright.TextSize = 14
  166. Bright.MouseButton1Down:connect(function()
  167. game.Lighting.TimeOfDay = 12
  168. game.Lighting.GlobalShadows = true
  169. game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  170. game.Lighting.Brightness = 1
  171. end)
  172.  
  173. Stop.Name = "Stop"
  174. Stop.Parent = Frame
  175. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  176. Stop.BorderSizePixel = 0
  177. Stop.Position = UDim2.new(0, 110, 0, 160)
  178. Stop.Size = UDim2.new(0, 90, 0, 30)
  179. Stop.Font = Enum.Font.Arcade
  180. Stop.FontSize = Enum.FontSize.Size14
  181. Stop.Text = "Stop"
  182. Stop.TextSize = 14
  183. Stop.MouseButton1Down:connect(function()
  184. sound.Playing = false
  185. end)
  186.  
  187. Hide.Name = "Hide"
  188. Hide.Parent = Frame
  189. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  190. Hide.BorderSizePixel = 0
  191. Hide.Position = UDim2.new(0, 210, 0, 160)
  192. Hide.Size = UDim2.new(0, 90, 0, 30)
  193. Hide.Font = Enum.Font.Arcade
  194. Hide.FontSize = Enum.FontSize.Size14
  195. Hide.Text = "Clear"
  196. Hide.TextSize = 14
  197. Hide.MouseButton1Down:connect(function()
  198. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  199. if v.Name == "location" then
  200. v:Remove()
  201. end
  202. end
  203. end)
  204.  
  205. --- Made By Pugz AKA (PugLover77)
  206. plyr = game.Players.LocalPlayer
  207. c = plyr.Character
  208. RunService = game:service'RunService'
  209. mouse = game.Players.LocalPlayer:GetMouse()
  210. local draw2 = false
  211. local colorA = 1
  212. local lastPos
  213.  
  214. tool = Instance.new("HopperBin", plyr.Backpack)
  215. tool.Name = "Draw"
  216.  
  217.  
  218.  
  219. mouse = plyr:GetMouse()
  220.  
  221.  
  222. function draw(obj) --
  223. local lastPos = obj.CFrame.p
  224. coroutine.wrap(function()
  225. while wait() do
  226. if draw2 then
  227. while draw2 do
  228. wait()
  229. objC = obj:Clone()
  230. objC.Parent = c
  231. objC.Anchored = true
  232. local distance = (lastPos- obj.CFrame.p).magnitude
  233. objC.Size = Vector3.new(.1,.1,distance)
  234. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  235. lastPos = obj.CFrame.p
  236. end
  237. else
  238. break
  239. end
  240. end
  241. end)()
  242. end
  243.  
  244. tool.Selected:connect(function(mouse)
  245.  
  246. mouse.Button1Down:connect(function(mouse)
  247. draw2 = true
  248. part = Instance.new("Part", c)
  249. mesh = Instance.new("BlockMesh",part)
  250. Li = Instance.new("PointLight",part)
  251. Li.Range = 8
  252. Li.Color = part.Color
  253. part.Name = "location"
  254.  
  255. part.BottomSurface = 0
  256. part.Material = MVal
  257. part.TopSurface = 0
  258. part.Size = Vector3.new()
  259. part.Transparency = TVal
  260. if Active == true then
  261. part.Color = Color3.new(math.random(), math.random(), math.random())
  262. elseif Active == false then
  263. part.BrickColor = BrickColor.new(BVal)
  264. end
  265. Li.Color = part.Color
  266. part.FormFactor = "Custom"
  267. part.Size = Vector3.new(0.01, 0.01, 0.01)
  268. part.Anchored = true
  269. part.Locked = true
  270. coroutine.wrap(function()
  271. while part ~= nil do
  272. part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  273. wait()
  274. end
  275. end)()
  276. wait()
  277. draw(part)
  278. wait()
  279. end)
  280. mouse.Button1Up:connect(function(mouse)
  281. draw2 = false
  282.  
  283. end)
  284.  
  285. end)
  286. x = 60
  287. game:GetService("RunService").Stepped:connect(function()
  288. n = sound.PlaybackLoudness
  289. if n > 500 then
  290. x = 100
  291. elseif n < 500 then
  292. x = 110
  293. end
  294. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  295. if v.Name == "location" then
  296. v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  297. v.PointLight.Range = n / 50
  298. end
  299. end
  300. end)
Add Comment
Please, Sign In to add comment