SHOW:
|
|
- or go back to the newest paste.
1 | --//FE MOD | |
2 | --//ADDED BY SENSEISPAZ | |
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,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | local RealPlayer = Player | |
7 | 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()}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;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 t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)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 self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({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")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end | |
8 | ||
9 | local s = Instance.new("ScreenGui", game.CoreGui) | |
10 | local f = Instance.new("Frame", s) | |
11 | local mselect = Instance.new("TextButton", f) | |
12 | local mbox = Instance.new("TextBox", f) | |
13 | local toggle = false | |
14 | local Player = game.Players.LocalPlayer | |
15 | local Character = Player.Character | |
16 | ||
17 | f.Size = UDim2.new(0,300,0,250) | |
18 | f.BorderSizePixel = 0 | |
19 | f.BackgroundColor3 = Color3.new(0.301961, 0.301961, 0.301961) | |
20 | f.Position = UDim2.new(0.5,-150,0.5,-125) | |
21 | f.Active = true | |
22 | f.Draggable = true | |
23 | ||
24 | mbox.Size = UDim2.new(0,250,0,50) | |
25 | mbox.Position = UDim2.new(0,25,0.1,0) | |
26 | mbox.BorderSizePixel = 0 | |
27 | mbox.Text = "Music ID Here:" | |
28 | mbox.Font = "SourceSansBold" | |
29 | mbox.TextColor3 = Color3.new(255, 255,255) | |
30 | mbox.BackgroundColor3 = Color3.new(1, 0.666667, 0) | |
31 | mbox.FontSize = "Size18" | |
32 | mbox.ZIndex = 10 | |
33 | ||
34 | mselect.Size = UDim2.new(0,250,0,50) | |
35 | mselect.Position = UDim2.new(0,25,0.6,0) | |
36 | mselect.BorderSizePixel = 0 | |
37 | mselect.Text = "Play Music" | |
38 | mselect.Font = "SourceSansBold" | |
39 | mselect.TextColor3 = Color3.new(255,255,255) | |
40 | mselect.BackgroundColor3 = Color3.new(0.333333, 0.666667, 1) | |
41 | mselect.FontSize = "Size18" | |
42 | mselect.ZIndex = 10 | |
43 | ||
44 | mselect.MouseButton1Click:connect(function() | |
45 | game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge -- this is god | |
46 | if toggle == false then | |
47 | loadPart() | |
48 | toggle = true | |
49 | elseif toggle == true then | |
50 | loadPart() | |
51 | toggle = false | |
52 | end | |
53 | end) | |
54 | ||
55 | function loadPart() | |
56 | for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
57 | if v.Name == "MusicItem" and v.ClassName == "Part" then | |
58 | v:Remove() | |
59 | end | |
60 | end | |
61 | local Part = Instance.new("Part", game.Players.LocalPlayer.Character) | |
62 | Part.CanCollide = false | |
63 | Part.Shape = "Block" | |
64 | Part.Anchored = false | |
65 | Part.Locked = true | |
66 | Part.Name = "MusicItem" | |
67 | Part.Transparency = 0 | |
68 | Part.Material = "Neon" | |
69 | Part.BrickColor = BrickColor.new("Royal purple") --Cool Colors CGA brown and Royal purple | |
70 | local CylinderMesh = Instance.new("CylinderMesh", Part) | |
71 | CylinderMesh.Scale = Vector3.new(1.5,.2,1.5) | |
72 | ||
73 | ||
74 | local Sound = Instance.new("Sound", Part) | |
75 | Sound.SoundId = "https://www.roblox.com/asset/?id="..mbox.Text | |
76 | Sound.EmitterSize = math.huge | |
77 | Sound.MaxDistance = math.huge | |
78 | Sound.Looped = true | |
79 | Sound.Pitch = 1 | |
80 | Sound.Name = "Sound" | |
81 | Sound.Volume = 10 | |
82 | Sound:Play() | |
83 | ||
84 | Part.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position) * CFrame.new(0,-2.9,0) | |
85 | local bp = Instance.new("BodyPosition", Part) | |
86 | bp.Position = Character:FindFirstChild("Torso").CFrame * CFrame.new(0, -2.9, 0).p | |
87 | bp.MaxForce = Vector3.new(10000,10000,10000) | |
88 | bp.P = 100000 | |
89 | ||
90 | while true do wait() | |
91 | bp.Position = Character:FindFirstChild("Torso").CFrame * CFrame.new(0, -2.9, 0).p | |
92 | local alg = math.floor(Sound.PlaybackLoudness)/50 | |
93 | CylinderMesh.Scale = Vector3.new(.6+alg,.2,.6+alg) | |
94 | end | |
95 | end |