SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has been converted to FE by iPxter | |
| 2 | - | Character = game.Players.LocalPlayer.Character |
| 2 | + | |
| 3 | - | Player = game.Players.LocalPlayer |
| 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 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | ----i didn't made the arrest em original script i just add the avatar. | |
| 88 | Character = game.Players.von12222222.Character | |
| 89 | Player = game.Players.von12222222 | |
| 90 | char = Character | |
| 91 | hum = Character.Humanoid | |
| 92 | Torso = Character.Torso | |
| 93 | Head = Character.Head | |
| 94 | ||
| 95 | char.Shirt.ShirtTemplate = "rbxassetid://1073211165" | |
| 96 | char.Pants.PantsTemplate = "rbxassetid://997496591" | |
| 97 | ||
| 98 | ||
| 99 | local BC = char["Body Colors"] | |
| 100 | BC.HeadColor = BrickColor.new("Pastel brown")
| |
| 101 | BC.LeftArmColor = BrickColor.new("Pastel brown")
| |
| 102 | BC.LeftLegColor = BrickColor.new("Pastel brown")
| |
| 103 | BC.RightArmColor = BrickColor.new("Pastel brown")
| |
| 104 | BC.RightLegColor = BrickColor.new("Pastel brown")
| |
| 105 | BC.TorsoColor = BrickColor.new("Pastel brown")
| |
| 106 | ||
| 107 | char.Head.face.Texture = "rbxassetid://42070872" | |
| 108 | ||
| 109 | hum.MaxHealth = math.huge | |
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | for i,v in pairs(char:children()) do | |
| 115 | if v:IsA("Hat") then
| |
| 116 | v:Destroy() | |
| 117 | - | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50 |
| 117 | + | |
| 118 | end | |
| 119 | for i,v in pairs(char:children()) do | |
| 120 | if v:IsA("Accessory") then
| |
| 121 | - | if hit.Parent ~= nil and hit.Parent:FindFirstChild("Head") ~= nil and hit.Parent.Name ~= game.Players.LocalPlayer.Name and debounce ~= true and hit.Parent.Head:FindFirstChild("ArrestedGui") == nil then
|
| 121 | + | |
| 122 | end | |
| 123 | end | |
| 124 | for i,v in pairs(char:children()) do | |
| 125 | - | message.Text = hit.Parent.Name.." Has been arrested by "..game.Players.LocalPlayer.Name.."! He or she has to spend "..num.." years in jail!" |
| 125 | + | |
| 126 | v:Destroy() | |
| 127 | end | |
| 128 | end | |
| 129 | --141378828 | |
| 130 | Reaper = Instance.new("Model")
| |
| 131 | Reaper.Parent = Player.Character | |
| 132 | Reaper.Name = "Reaper" | |
| 133 | rh = Instance.new("Part")
| |
| 134 | rh.Parent = Reaper | |
| 135 | rh.BrickColor = BrickColor.new("Really red")
| |
| 136 | rh.Locked = true | |
| 137 | rh.CanCollide = false | |
| 138 | mesh = Instance.new("SpecialMesh")
| |
| 139 | rh.formFactor = "Symmetric" | |
| 140 | mesh.MeshType = "FileMesh" | |
| 141 | mesh.MeshId = "http://www.roblox.com/asset/?id=1028788" | |
| 142 | mesh.TextureId = "http://www.roblox.com/asset/?id=1081380" | |
| 143 | mesh.Parent = rh | |
| 144 | local weld = Instance.new("Weld")
| |
| 145 | weld.Parent = rh | |
| 146 | rh.Transparency = 0 | |
| 147 | weld.Part0 = rh | |
| 148 | weld.Part1 = Player.Character.Head | |
| 149 | weld.C0 = weld.C0 * CFrame.new(0,-0.70,0.10) | |
| 150 | ||
| 151 | local s = Instance.new("Sound",char)
| |
| 152 | s.SoundId = "http://www.roblox.com/asset/?id=458157165" | |
| 153 | s.Pitch = 1 | |
| 154 | s.Volume = 2 | |
| 155 | s.Looped = true | |
| 156 | wait(1) | |
| 157 | s:play() | |
| 158 | ||
| 159 | ||
| 160 | function sandbox(var,func) | |
| 161 | local env = getfenv(func) | |
| 162 | local newenv = setmetatable({},{
| |
| 163 | __index = function(self,k) | |
| 164 | if k=="script" then | |
| 165 | return var | |
| 166 | else | |
| 167 | return env[k] | |
| 168 | end | |
| 169 | end, | |
| 170 | }) | |
| 171 | setfenv(func,newenv) | |
| 172 | return func | |
| 173 | end | |
| 174 | cors = {}
| |
| 175 | mas = Instance.new("Model",game:GetService("Lighting"))
| |
| 176 | Tool0 = Instance.new("Tool")
| |
| 177 | Part1 = Instance.new("Part")
| |
| 178 | SpecialMesh2 = Instance.new("SpecialMesh")
| |
| 179 | Script3 = Instance.new("Script")
| |
| 180 | Tool0.Name = "Arrest" | |
| 181 | Tool0.Parent = mas | |
| 182 | Tool0.GripForward = Vector3.new(-0.77155745, 0.462976098, 0.43629396) | |
| 183 | Tool0.GripPos = Vector3.new(0.899999976, 0.5, 0.400000006) | |
| 184 | Tool0.GripRight = Vector3.new(0.632408082, 0.63257581, 0.447110623) | |
| 185 | Tool0.GripUp = Vector3.new(0.0689874813, -0.620887339, 0.780858338) | |
| 186 | Tool0.ToolTip = "Take those skids to gulag!" | |
| 187 | Tool0.CanBeDropped = false | |
| 188 | Part1.Name = "Handle" | |
| 189 | - | v.Parent = game:GetService("Players").LocalPlayer.Backpack
|
| 189 | + | |
| 190 | Part1.FormFactor = Enum.FormFactor.Custom | |
| 191 | Part1.Size = Vector3.new(2, 2, 2) | |
| 192 | Part1.CFrame = CFrame.new(1.70000003e-05, 1.00001395, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 193 | Part1.Position = Vector3.new(1.70000003e-05, 1.00001395, 0) | |
| 194 | SpecialMesh2.Parent = Part1 | |
| 195 | SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=88046657" | |
| 196 | SpecialMesh2.Scale = Vector3.new(2, 2, 2) | |
| 197 | SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=88046679" | |
| 198 | SpecialMesh2.MeshType = Enum.MeshType.FileMesh | |
| 199 | SpecialMesh2.Scale = Vector3.new(2, 2, 2) | |
| 200 | Script3.Parent = Part1 | |
| 201 | debounce = false | |
| 202 | ||
| 203 | game.Players.von12222222.Character.Humanoid.WalkSpeed = 50 | |
| 204 | ||
| 205 | table.insert(cors,sandbox(Script3,function() | |
| 206 | function arrest(hit) | |
| 207 | if hit.Parent ~= nil and hit.Parent:FindFirstChild("Head") ~= nil and hit.Parent.Name ~= game.Players.von12222222.Name and debounce ~= true and hit.Parent.Head:FindFirstChild("ArrestedGui") == nil then
| |
| 208 | debounce = true | |
| 209 | num = math.random(1,99) | |
| 210 | local message = Instance.new("Hint",workspace)
| |
| 211 | message.Text = hit.Parent.Name.." Has been arrested by "..game.Players.von12222222.Name.."! He or she has to spend "..num.." years in jail!" | |
| 212 | --hit.Parent:Destroy() | |
| 213 | ||
| 214 | hit.Parent.Humanoid.MaxHealth = math.huge | |
| 215 | print("Godded!")
| |
| 216 | a = Instance.new("ForceField", hit.Parent)
| |
| 217 | a.Visible = false | |
| 218 | print("FFed!")
| |
| 219 | ||
| 220 | local SOUND = Instance.new("Sound", script.Parent)
| |
| 221 | SOUND.SoundId = "rbxassetid://460919688" | |
| 222 | SOUND.Volume = 10 | |
| 223 | SOUND:Play() | |
| 224 | BillboardGui0 = Instance.new("BillboardGui")
| |
| 225 | TextLabel1 = Instance.new("TextLabel")
| |
| 226 | BillboardGui0.Name = "ArrestedGui" | |
| 227 | BillboardGui0.Parent = hit.Parent.Head | |
| 228 | BillboardGui0.Size = UDim2.new(10, 0, 2, 0) | |
| 229 | BillboardGui0.StudsOffset = Vector3.new(0, 3, 0) | |
| 230 | TextLabel1.Name = "Text" | |
| 231 | TextLabel1.Parent = BillboardGui0 | |
| 232 | TextLabel1.Transparency = 1 | |
| 233 | TextLabel1.Size = UDim2.new(1, 0, 1, 0) | |
| 234 | TextLabel1.Text = hit.Parent.Name.."| Arrested | "..num.. " Years until release" | |
| 235 | TextLabel1.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 236 | TextLabel1.BackgroundTransparency = 1 | |
| 237 | TextLabel1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
| 238 | TextLabel1.Font = Enum.Font.ArialBold | |
| 239 | TextLabel1.FontSize = Enum.FontSize.Size48 | |
| 240 | TextLabel1.TextColor3 = Color3.new(1, 1, 1) | |
| 241 | TextLabel1.TextScaled = true | |
| 242 | TextLabel1.TextStrokeTransparency = 0 | |
| 243 | TextLabel1.TextWrapped = true | |
| 244 | TextLabel1.TextYAlignment = Enum.TextYAlignment.Top | |
| 245 | game:GetService("Debris"):AddItem(SOUND,5)
| |
| 246 | game:GetService("Debris"):AddItem(message,5)
| |
| 247 | hit.Parent.Humanoid:Destroy() | |
| 248 | --jailtime(hit.Parent) | |
| 249 | wait(3) | |
| 250 | debounce = false | |
| 251 | end | |
| 252 | ||
| 253 | end | |
| 254 | ||
| 255 | ||
| 256 | function jailtime(char) | |
| 257 | for i = num, 0, -1 do | |
| 258 | wait(1) | |
| 259 | TextLabel1.Text = char.Name.."| Arrested | "..i.. " Years until release" | |
| 260 | end | |
| 261 | ||
| 262 | char.Humanoid.MaxHealth = 100 | |
| 263 | print("Godded!")
| |
| 264 | char.ForceField:Destroy() | |
| 265 | print("UNFFed!")
| |
| 266 | ||
| 267 | char.Humanoid.PlatformStand = false | |
| 268 | ||
| 269 | BillboardGui0:Destroy() | |
| 270 | end | |
| 271 | ||
| 272 | script.Parent.Touched:connect(arrest) | |
| 273 | end)) | |
| 274 | for i,v in pairs(mas:GetChildren()) do | |
| 275 | v.Parent = game:GetService("Players").von12222222.Backpack
| |
| 276 | pcall(function() v:MakeJoints() end) | |
| 277 | end | |
| 278 | mas:Destroy() | |
| 279 | for i,v in pairs(cors) do | |
| 280 | spawn(function() | |
| 281 | pcall(v) | |
| 282 | end) | |
| 283 | end |