Advertisement
Guest User

Visualiser

a guest
Apr 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.52 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  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 Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  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.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. -- Objects
  148. MIDI = Instance.new("ScreenGui")
  149. Frame = Instance.new("Frame")
  150. ID = Instance.new("TextBox")
  151. Play = Instance.new("TextButton")
  152. Dark = Instance.new("TextButton")
  153. Bright = Instance.new("TextButton")
  154. Stop = Instance.new("TextButton")
  155. Hide = Instance.new("TextButton")
  156. Set = Instance.new("TextButton")
  157. BColor = Instance.new("TextBox")
  158. Random = Instance.new("TextButton")
  159. Material = Instance.new("TextBox")
  160. Trans = Instance.new("TextBox")
  161. sound = Instance.new("Sound",game.Players.LocalPlayer.Character.Torso)
  162. sound.Volume = 4
  163. sound.Looped = true
  164. BVal = "Deep orange"
  165. MVal = "Neon"
  166. TVal = 0
  167. Active = false
  168.  
  169. -- Properties
  170.  
  171. MIDI.Name = "MIDI"
  172. MIDI.Parent = game.Players.LocalPlayer.PlayerGui
  173.  
  174. Frame.Parent = MIDI
  175. Frame.Active = true
  176. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  177. Frame.BackgroundTransparency = 0.5799999833107
  178. Frame.BorderSizePixel = 0
  179. Frame.Draggable = true
  180. Frame.Position = UDim2.new(0, 300, 0, 50)
  181. Frame.Size = UDim2.new(0, 310, 0, 200)
  182.  
  183. ID.Name = "ID"
  184. ID.Parent = Frame
  185. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  186. ID.BorderSizePixel = 0
  187. ID.Position = UDim2.new(0, 100, 0, 10)
  188. ID.Size = UDim2.new(0, 120, 0, 30)
  189. ID.Font = Enum.Font.Arcade
  190. ID.FontSize = Enum.FontSize.Size18
  191. ID.Text = "639837244"
  192. ID.TextColor3 = Color3.new(0, 0, 0)
  193. ID.TextSize = 18
  194.  
  195. Material.Name = "Material"
  196. Material.Parent = Frame
  197. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  198. Material.BorderSizePixel = 0
  199. Material.Position = UDim2.new(0, 210, 0, 95)
  200. Material.Size = UDim2.new(0, 90, 0, 15)
  201. Material.Font = Enum.Font.Arcade
  202. Material.FontSize = Enum.FontSize.Size14
  203. Material.Text = "Neon"
  204. Material.TextSize = 14
  205.  
  206. Trans.Name = "Trans"
  207. Trans.Parent = Frame
  208. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  209. Trans.BorderSizePixel = 0
  210. Trans.Position = UDim2.new(0, 210, 0, 75)
  211. Trans.Size = UDim2.new(0, 90, 0, 15)
  212. Trans.Font = Enum.Font.Arcade
  213. Trans.FontSize = Enum.FontSize.Size14
  214. Trans.Text = "Transparency"
  215. Trans.TextSize = 14
  216.  
  217. Set.Name = "Set"
  218. Set.Parent = Frame
  219. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  220. Set.BorderSizePixel = 0
  221. Set.Position = UDim2.new(0, 210, 0, 135)
  222. Set.Size = UDim2.new(0, 90, 0, 15)
  223. Set.Font = Enum.Font.Arcade
  224. Set.FontSize = Enum.FontSize.Size14
  225. Set.Text = "Set"
  226. Set.TextSize = 14
  227. Set.MouseButton1Down:connect(function()
  228. if Active == true then
  229. Active = false
  230. end
  231. BVal = tostring(BColor.Text)
  232. TVal = tonumber(Trans.Text)
  233. MVal = tostring(Material.Text)
  234. end)
  235.  
  236. BColor.Name = "BColor"
  237. BColor.Parent = Frame
  238. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  239. BColor.BorderSizePixel = 0
  240. BColor.Position = UDim2.new(0, 210, 0, 115)
  241. BColor.Size = UDim2.new(0, 90, 0, 15)
  242. BColor.Font = Enum.Font.Arcade
  243. BColor.FontSize = Enum.FontSize.Size14
  244. BColor.Text = "Lime Green"
  245. BColor.TextSize = 14
  246.  
  247. Random.Name = "Random"
  248. Random.Parent = Frame
  249. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  250. Random.BorderSizePixel = 0
  251. Random.Position = UDim2.new(0, 10, 0, 80)
  252. Random.Size = UDim2.new(0, 90, 0, 30)
  253. Random.Font = Enum.Font.Arcade
  254. Random.FontSize = Enum.FontSize.Size14
  255. Random.Text = "Random"
  256. Random.TextSize = 14
  257. Random.MouseButton1Down:connect(function()
  258. if Active == false then
  259. Active = true
  260. end
  261. end)
  262.  
  263. Play.Name = "Play"
  264. Play.Parent = Frame
  265. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  266. Play.BorderSizePixel = 0
  267. Play.Position = UDim2.new(0, 10, 0, 160)
  268. Play.Size = UDim2.new(0, 90, 0, 30)
  269. Play.Font = Enum.Font.Arcade
  270. Play.FontSize = Enum.FontSize.Size14
  271. Play.Text = "Play"
  272. Play.TextSize = 14
  273. Play.MouseButton1Down:connect(function()
  274. sound.TimePosition = 0
  275. sound.Playing = true
  276. sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  277. end)
  278.  
  279. Dark.Name = "Dark"
  280. Dark.Parent = Frame
  281. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  282. Dark.BorderSizePixel = 0
  283. Dark.Position = UDim2.new(0, 10, 0, 120)
  284. Dark.Size = UDim2.new(0, 90, 0, 30)
  285. Dark.Font = Enum.Font.Arcade
  286. Dark.FontSize = Enum.FontSize.Size14
  287. Dark.Text = "Dark"
  288. Dark.TextSize = 14
  289. Dark.MouseButton1Down:connect(function()
  290. game.Lighting.TimeOfDay = 0
  291. game.Lighting.GlobalShadows = false
  292. game.Lighting.Ambient = Color3.new(0,0,0)
  293. game.Lighting.Brightness = 0
  294. end)
  295.  
  296. Bright.Name = "Bright"
  297. Bright.Parent = Frame
  298. Bright.BackgroundColor3 = Color3.new(1, 1, 1)
  299. Bright.BorderSizePixel = 0
  300. Bright.Position = UDim2.new(0, 110, 0, 120)
  301. Bright.Size = UDim2.new(0, 90, 0, 30)
  302. Bright.Font = Enum.Font.Arcade
  303. Bright.FontSize = Enum.FontSize.Size14
  304. Bright.Text = "Bright"
  305. Bright.TextSize = 14
  306. Bright.MouseButton1Down:connect(function()
  307. game.Lighting.TimeOfDay = 12
  308. game.Lighting.GlobalShadows = true
  309. game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  310. game.Lighting.Brightness = 1
  311. end)
  312.  
  313. Stop.Name = "Stop"
  314. Stop.Parent = Frame
  315. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  316. Stop.BorderSizePixel = 0
  317. Stop.Position = UDim2.new(0, 110, 0, 160)
  318. Stop.Size = UDim2.new(0, 90, 0, 30)
  319. Stop.Font = Enum.Font.Arcade
  320. Stop.FontSize = Enum.FontSize.Size14
  321. Stop.Text = "Stop"
  322. Stop.TextSize = 14
  323. Stop.MouseButton1Down:connect(function()
  324. sound.Playing = false
  325. end)
  326.  
  327. Hide.Name = "Hide"
  328. Hide.Parent = Frame
  329. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  330. Hide.BorderSizePixel = 0
  331. Hide.Position = UDim2.new(0, 210, 0, 160)
  332. Hide.Size = UDim2.new(0, 90, 0, 30)
  333. Hide.Font = Enum.Font.Arcade
  334. Hide.FontSize = Enum.FontSize.Size14
  335. Hide.Text = "Clear"
  336. Hide.TextSize = 14
  337. Hide.MouseButton1Down:connect(function()
  338. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  339. if v.Name == "location" then
  340. v:Remove()
  341. end
  342. end
  343. end)
  344.  
  345. --- Made By Pugz AKA (PugLover77)
  346. plyr = game.Players.LocalPlayer
  347. c = plyr.Character
  348. RunService = game:service'RunService'
  349. mouse = game.Players.LocalPlayer:GetMouse()
  350. local draw2 = false
  351. local colorA = 1
  352. local lastPos
  353.  
  354. tool = Instance.new("HopperBin", plyr.Backpack)
  355. tool.Name = "Draw"
  356.  
  357.  
  358.  
  359. mouse = plyr:GetMouse()
  360.  
  361.  
  362. function draw(obj) --
  363. local lastPos = obj.CFrame.p
  364. coroutine.wrap(function()
  365. while wait() do
  366. if draw2 then
  367. while draw2 do
  368. wait()
  369. objC = obj:Clone()
  370. objC.Parent = c
  371. objC.Anchored = true
  372. local distance = (lastPos- obj.CFrame.p).magnitude
  373. objC.Size = Vector3.new(.1,.1,distance)
  374. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  375. lastPos = obj.CFrame.p
  376. end
  377. else
  378. break
  379. end
  380. end
  381. end)()
  382. end
  383.  
  384. tool.Selected:connect(function(mouse)
  385.  
  386. mouse.Button1Down:connect(function(mouse)
  387. draw2 = true
  388. part = Instance.new("Part", c)
  389. mesh = Instance.new("BlockMesh",part)
  390. Li = Instance.new("PointLight",part)
  391. Li.Range = 8
  392. Li.Color = part.Color
  393. part.Name = "location"
  394.  
  395. part.BottomSurface = 0
  396. part.Material = MVal
  397. part.TopSurface = 0
  398. part.Size = Vector3.new()
  399. part.Transparency = TVal
  400. if Active == true then
  401. part.Color = Color3.new(math.random(), math.random(), math.random())
  402. elseif Active == false then
  403. part.BrickColor = BrickColor.new(BVal)
  404. end
  405. Li.Color = part.Color
  406. part.FormFactor = "Custom"
  407. part.Size = Vector3.new(0.01, 0.01, 0.01)
  408. part.Anchored = true
  409. part.Locked = true
  410. coroutine.wrap(function()
  411. while part ~= nil do
  412. part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  413. wait()
  414. end
  415. end)()
  416. wait()
  417. draw(part)
  418. wait()
  419. end)
  420. mouse.Button1Up:connect(function(mouse)
  421. draw2 = false
  422.  
  423. end)
  424.  
  425. end)
  426. x = 60
  427. game:GetService("RunService").Stepped:connect(function()
  428. n = sound.PlaybackLoudness
  429. if n > 500 then
  430. x = 100
  431. elseif n < 500 then
  432. x = 110
  433. end
  434. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  435. if v.Name == "location" then
  436. v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  437. v.PointLight.Range = n / 50
  438. end
  439. end
  440. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement