View difference between Paste ID: 4JsngT0w and 2XTiKdEH
SHOW: | | - or go back to the newest paste.
1-
--Donald Trump by drslicendice
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,game,owner = owner,game
4
local RealPlayer = Player
5
do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end --Donald Trump by drslicendice
6
wallSize = 30
7
8
local trumpGui=Instance.new("BillboardGui")
9
trumpGui.Parent=game.Players.LocalPlayer.Character.Head
10
trumpGui.AlwaysOnTop = true
11
trumpGui.Adornee=game.Players.LocalPlayer.Character.Head
12
trumpGui.Size=UDim2.new(0.7,0,0.7,0)
13
trumpGui.StudsOffset=Vector3.new(0,1.5,0)
14
15
local trumpImage=Instance.new("ImageLabel")
16
trumpImage.Size=UDim2.new(4,0,4,0)
17
trumpImage.Position=UDim2.new(-1.5,0,0,0)
18
trumpImage.BackgroundTransparency = 1
19
trumpImage.Parent =trumpGui
20
trumpImage.Image = "rbxassetid://343377229"
21
22
local trumpFakeName = Instance.new("Model",game.Players.LocalPlayer.Character)
23
trumpFakeName.Name = "Donald Trump"
24
25
local fakeHead = Instance.new("Part")
26
fakeHead.Size = Vector3.new(0,0,0)
27
fakeHead.Transparency = 0.99
28
fakeHead.Name = "Head"
29
fakeHead.Parent = trumpFakeName
30
31
local fakeHumanoid = Instance.new("Humanoid",trumpFakeName)
32
33
local fakeWeld = Instance.new("Weld", fakeHead)
34
fakeWeld.Part0 = game.Players.LocalPlayer.Character.Head
35
fakeWeld.Part1 = fakeHead
36
fakeWeld.C1 = CFrame.new(0,-1,0)
37
38
for _,instance in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
39
if instance:IsA("BasePart") then
40
instance.BrickColor = BrickColor.new("Pastel brown")
41
if instance:FindFirstChild("roblox") then
42
instance.roblox:Destroy()
43
end
44
elseif instance:IsA("Accessory") then
45
instance:Destroy()
46
elseif instance:IsA("Hat") then
47
instance:Destroy()
48
elseif instance:IsA("Shirt") then
49
instance:Destroy()
50
elseif instance:IsA("Pants") then
51
instance:Destroy()
52
elseif instance:IsA("ShirtGraphic") then
53
instance:Destroy()	
54
elseif instance:IsA("Humanoid") then
55
instance.DisplayDistanceType = "None"
56
end end
57
58
local Pants = Instance.new("Pants",game.Players.LocalPlayer.Character)
59
Pants.PantsTemplate = "rbxassetid://158140067"
60
61
local Shirt = Instance.new("Shirt",game.Players.LocalPlayer.Character)
62
Shirt.ShirtTemplate = "rbxassetid://158140064"
63
64
local wallSoundEffect = Instance.new("Sound",workspace)
65
wallSoundEffect.SoundId = "rbxassetid://564873213"
66
wallSoundEffect.Volume = 1
67
wallSoundEffect:Play()
68
69
local wallPart = Instance.new("Part")
70
wallPart.Anchored = true
71
wallPart.Material = "Brick"
72
73
local wallMesh = Instance.new("BlockMesh",wallPart)
74
wallMesh.Name = "wallMesh"
75
76
local wallModel = Instance.new("Model",workspace)
77
78
local wallTool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
79
wallTool.RequiresHandle = false
80
wallTool.Name = "Make America Great Again"
81
wallTool.ToolTip = "Click twice to start building walls and click another time to expand it!"
82
83
local clearTool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
84
clearTool.RequiresHandle = false
85
clearTool.Name = "Clear Wall"
86
clearTool.ToolTip = "Click to clear the wall."
87
88
local trumpSound = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
89
trumpSound.RequiresHandle = false
90
trumpSound.Name = "Trump Sound Effect"
91
trumpSound.ToolTip = "Play a random trump sound effect."
92
93
local trumpSoundEffect= Instance.new("Sound",game.Players.LocalPlayer.Character.Head)
94
trumpSoundEffect.EmitterSize = 50
95
96
local Sounds = {
97
"rbxassetid://565474983",
98
"rbxassetid://565475139",
99
"rbxassetid://565475310",
100
"rbxassetid://566858778",
101
"rbxassetid://566858873",
102
"rbxassetid://566858914"}
103
104
local Graffiti = {
105
{"rbxassetid://53146539",9,14},
106
{"rbxassetid://526928323",8,13},
107
{"rbxassetid://237333246",8,13},
108
{"rbxassetid://237333406",8,13},
109
{"rbxassetid://495853603",8,13},
110
{"rbxassetid://237334181",8,13},
111
{"rbxassetid://154644862",8,13},
112
{"rbxassetid://81275908",8,22},
113
{"rbxassetid://66374105",8,13},
114
{"rbxassetid://25400219",8,8},}
115
 
116
local previousPoint = nil
117
118
trumpSound.Equipped:connect(function(mouse)
119
mouse.Button1Down:connect(function()
120
local newSound
121
repeat newSound = Sounds[math.random(1,#Sounds)] until newSound ~= trumpSoundEffect.SoundId
122
trumpSoundEffect.SoundId = newSound
123
trumpSoundEffect.Volume = 1
124
trumpSoundEffect:Play()
125
end)end)
126
127
clearTool.Equipped:connect(function(mouse)
128
mouse.Button1Down:connect(function()
129
wallModel:ClearAllChildren()
130
previousPoint = nil
131
end)end)
132
133
wallTool.Equipped:connect(function(mouse)
134
mouse.Button1Down:connect(function()
135
if previousPoint == nil then
136
previousPoint = mouse.Hit.p	
137
else
138
local wallWidth = (mouse.Hit.p - previousPoint).Magnitude		
139
local newWallPart = wallPart:Clone()
140
newWallPart.Size = Vector3.new(2,wallSize * 2,wallWidth)
141
newWallPart.CFrame = CFrame.new( mouse.Hit.p:lerp(previousPoint,0.5),previousPoint)
142
newWallPart.Parent = wallModel
143
mouse.TargetFilter = wallModel
144
previousPoint = mouse.Hit.p		
145
146
local wallSeperator = wallPart:Clone()
147
wallSeperator.Size = Vector3.new(3,(wallSize *2) + 1,4)
148
149
for wallPosition = 1,wallWidth,20 do
150
local newWallSeperator = wallSeperator:Clone()
151
newWallSeperator.CFrame = newWallPart.CFrame * CFrame.new(0,0,(-wallWidth/2) + wallPosition)
152
newWallSeperator.Parent = wallModel 	
153
end
154
155
if math.random(1,2) == 2 then
156
local randomGraffiti = Graffiti[math.random(1,#Graffiti)]
157
if randomGraffiti[2] <= wallSize and randomGraffiti[3] <= wallWidth then
158
local movingSpace = math.floor(((wallWidth - randomGraffiti[2])/2)* 1000)
159
local decalPart = wallPart:Clone()
160
decalPart.Transparency = 1
161
decalPart.CFrame = newWallPart.CFrame * CFrame.new(0,wallSize/2,math.random(-movingSpace,movingSpace)/2000) * CFrame.Angles(math.rad(math.random(-45,45)),0,0)
162
decalPart.Size = Vector3.new(2.1,randomGraffiti[2] + math.random(-2000,2000)/1000,randomGraffiti[3]+ math.random(-2000,2000)/1000)
163
decalPart.Parent = wallModel
164
local graffitiDecal = Instance.new("Decal",decalPart)
165
graffitiDecal.Texture = randomGraffiti[1]
166
graffitiDecal.Face = "Left" 
167
end end end end)end)