SHOW:
|
|
- or go back to the newest paste.
| 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 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 | Watch | |
| 8 | Zomg a watch. | |
| 9 | --]] | |
| 10 | ||
| 11 | ModelName = "Watch" | |
| 12 | Player = game:GetService("Players").LocalPlayer
| |
| 13 | Char = Player.Character | |
| 14 | animate = Char:findFirstChild("Animate")
| |
| 15 | if animate then | |
| 16 | animate:Destroy() | |
| 17 | end | |
| 18 | Selected = false | |
| 19 | Connected = false | |
| 20 | Button1Down = false | |
| 21 | CanUse = true | |
| 22 | WatchColor = BrickColor.new("Really black")
| |
| 23 | FaceColor = BrickColor.new("Really black")
| |
| 24 | FaceBackColor = BrickColor.new("Really black")
| |
| 25 | CenterHandColor = BrickColor.new("Really black")
| |
| 26 | NotchColor1 = BrickColor.new("Bright green")
| |
| 27 | NotchColor2 = BrickColor.new("Bright green")
| |
| 28 | HourHandColor = BrickColor.new("Really black")
| |
| 29 | MinuteHandColor = BrickColor.new("Really black")
| |
| 30 | SecondHandColor = BrickColor.new("Really red")
| |
| 31 | ||
| 32 | ||
| 33 | ||
| 34 | function CheckPlayer() | |
| 35 | if Player.Character == nil then return false end | |
| 36 | if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
| |
| 37 | if Player.Character.Humanoid.Health <= 0 then return false end | |
| 38 | return true | |
| 39 | end | |
| 40 | ||
| 41 | ||
| 42 | ||
| 43 | ||
| 44 | function Time() | |
| 45 | local Hours = math.floor((tick() / 3600) % 24) | |
| 46 | local Minutes = math.floor((tick() % 3600) / 60) | |
| 47 | local Seconds = math.floor(tick() % 60) | |
| 48 | local Section = "" | |
| 49 | if Hours == 24 or Hours < 12 then | |
| 50 | Section = "AM" | |
| 51 | else | |
| 52 | Section = "PM" | |
| 53 | end | |
| 54 | if Hours > 12 then | |
| 55 | Hours = Hours - 12 | |
| 56 | end | |
| 57 | if Minutes <= 9 then | |
| 58 | Minutes = "0" ..tostring(Minutes) | |
| 59 | end | |
| 60 | if Seconds <= 9 then | |
| 61 | Seconds = "0" ..tostring(Seconds) | |
| 62 | end | |
| 63 | return Hours, Minutes, Seconds, Section | |
| 64 | end | |
| 65 | ||
| 66 | ||
| 67 | function CreateParts(Parent, Format) | |
| 68 | if Parent == nil then return end | |
| 69 | local Parts = Instance.new("Model")
| |
| 70 | Parts.Name = ModelName | |
| 71 | if Format == 1 then | |
| 72 | Parts.Name = Parts.Name.. " (Holstered)" | |
| 73 | end | |
| 74 | Parts.Parent = Player.Character | |
| 75 | ||
| 76 | local MasterPart1 = Instance.new("Part")
| |
| 77 | MasterPart1.Material = "Neon" | |
| 78 | MasterPart1.Name = "Handle" | |
| 79 | MasterPart1.FormFactor = "Custom" | |
| 80 | MasterPart1.Size = Vector3.new(1.1, 0.2, 1.1) | |
| 81 | MasterPart1.BrickColor = WatchColor | |
| 82 | MasterPart1.TopSurface = 0 | |
| 83 | MasterPart1.BottomSurface = 0 | |
| 84 | MasterPart1.Parent = Parts | |
| 85 | Instance.new("BlockMesh", MasterPart1)
| |
| 86 | local Weld = Instance.new("Weld", MasterPart1)
| |
| 87 | Weld.Part0 = Weld.Parent | |
| 88 | Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
| |
| 89 | Weld.C0 = CFrame.new(0, 0.7, 0) | |
| 90 | ||
| 91 | local MasterPart2 = Instance.new("Part")
| |
| 92 | MasterPart2.Material = "Neon" | |
| 93 | MasterPart2.Name = "Watch" | |
| 94 | MasterPart2.FormFactor = "Custom" | |
| 95 | MasterPart2.Size = Vector3.new(0.5, 0.21, 0.5) | |
| 96 | MasterPart2.BrickColor = WatchColor | |
| 97 | MasterPart2.TopSurface = 0 | |
| 98 | MasterPart2.BottomSurface = 0 | |
| 99 | MasterPart2.Parent = Parts | |
| 100 | Instance.new("CylinderMesh", MasterPart2)
| |
| 101 | local Weld = Instance.new("Weld", MasterPart2)
| |
| 102 | Weld.Part0 = Weld.Parent | |
| 103 | Weld.Part1 = MasterPart1 | |
| 104 | Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(90), 0) * CFrame.new(-0.5, 0, 0) | |
| 105 | ||
| 106 | for i = 0, 360, 15 do | |
| 107 | local Part = Instance.new("Part")
| |
| 108 | Part.Material = "Neon" | |
| 109 | Part.Name = "Face Rim" | |
| 110 | Part.FormFactor = "Custom" | |
| 111 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 112 | Part.BrickColor = WatchColor | |
| 113 | Part.TopSurface = 0 | |
| 114 | Part.BottomSurface = 0 | |
| 115 | Part.Parent = Parts | |
| 116 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.065 / 0.2, 0.03 / 0.2, 0.05 / 0.2)
| |
| 117 | local Weld = Instance.new("Weld", Part)
| |
| 118 | Weld.Part0 = Weld.Parent | |
| 119 | Weld.Part1 = MasterPart2 | |
| 120 | Weld.C0 = CFrame.new(0, 0.12, 0.224) * CFrame.fromEulerAnglesXYZ(0, math.rad(i), 0) | |
| 121 | end | |
| 122 | ||
| 123 | local Part = Instance.new("Part")
| |
| 124 | Part.Material = "Neon" | |
| 125 | Part.Name = "Face" | |
| 126 | Part.FormFactor = "Custom" | |
| 127 | Part.Size = Vector3.new(0.4, 0.2, 0.4) | |
| 128 | Part.BrickColor = FaceColor | |
| 129 | Part.Transparency = 0.8 | |
| 130 | Part.TopSurface = 0 | |
| 131 | Part.BottomSurface = 0 | |
| 132 | Part.Parent = Parts | |
| 133 | Instance.new("CylinderMesh", Part).Scale = Vector3.new(1, 0.06 / 0.2, 1)
| |
| 134 | local Weld = Instance.new("Weld", Part)
| |
| 135 | Weld.Part0 = Weld.Parent | |
| 136 | Weld.Part1 = MasterPart2 | |
| 137 | Weld.C0 = CFrame.new(0, 0.1, 0) | |
| 138 | ||
| 139 | local Part = Instance.new("Part")
| |
| 140 | Part.Material = "Neon" | |
| 141 | Part.Name = "Face Back" | |
| 142 | Part.FormFactor = "Custom" | |
| 143 | Part.Size = Vector3.new(0.4, 0.2, 0.4) | |
| 144 | Part.BrickColor = FaceBackColor | |
| 145 | Part.TopSurface = 0 | |
| 146 | Part.BottomSurface = 0 | |
| 147 | Part.Parent = Parts | |
| 148 | Instance.new("CylinderMesh", Part).Scale = Vector3.new(1, 0.0105 / 0.2, 1)
| |
| 149 | local Weld = Instance.new("Weld", Part)
| |
| 150 | Weld.Part0 = Weld.Parent | |
| 151 | Weld.Part1 = MasterPart2 | |
| 152 | Weld.C0 = CFrame.new(0, 0.1, 0) | |
| 153 | ||
| 154 | local Part = Instance.new("Part")
| |
| 155 | Part.Material = "Neon" | |
| 156 | Part.Name = "Hand Center" | |
| 157 | Part.FormFactor = "Custom" | |
| 158 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 159 | Part.BrickColor = CenterHandColor | |
| 160 | Part.TopSurface = 0 | |
| 161 | Part.BottomSurface = 0 | |
| 162 | Part.Parent = Parts | |
| 163 | Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.035 / 0.2, 0.04 / 0.2, 0.035 / 0.2)
| |
| 164 | local Weld = Instance.new("Weld", Part)
| |
| 165 | Weld.Part0 = Weld.Parent | |
| 166 | Weld.Part1 = MasterPart2 | |
| 167 | Weld.C0 = CFrame.new(0, 0.1, 0) | |
| 168 | ||
| 169 | for i = 0, 360, 360 / 20 do | |
| 170 | if i % (360 / 4) ~= 0 then | |
| 171 | local Part = Instance.new("Part")
| |
| 172 | Part.Material = "Neon" | |
| 173 | Part.Name = "Notch 1" | |
| 174 | Part.FormFactor = "Custom" | |
| 175 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 176 | Part.BrickColor = NotchColor1 | |
| 177 | Part.TopSurface = 0 | |
| 178 | Part.BottomSurface = 0 | |
| 179 | Part.Parent = Parts | |
| 180 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.01 / 0.2, 0.01075 / 0.2, 0.03 / 0.2)
| |
| 181 | local Weld = Instance.new("Weld", Part)
| |
| 182 | Weld.Part0 = Weld.Parent | |
| 183 | Weld.Part1 = MasterPart2 | |
| 184 | Weld.C0 = CFrame.new(0, 0.1, 0.17) * CFrame.fromEulerAnglesXYZ(0, math.rad(i), 0) | |
| 185 | end | |
| 186 | end | |
| 187 | ||
| 188 | for i = 0, 360, 360 / 4 do | |
| 189 | local Part = Instance.new("Part")
| |
| 190 | Part.Material = "Neon" | |
| 191 | Part.Name = "Notch 2" | |
| 192 | Part.FormFactor = "Custom" | |
| 193 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 194 | Part.BrickColor = NotchColor2 | |
| 195 | Part.TopSurface = 0 | |
| 196 | Part.BottomSurface = 0 | |
| 197 | Part.Parent = Parts | |
| 198 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.02 / 0.2, 0.011 / 0.2, 0.05 / 0.2)
| |
| 199 | local Weld = Instance.new("Weld", Part)
| |
| 200 | Weld.Part0 = Weld.Parent | |
| 201 | Weld.Part1 = MasterPart2 | |
| 202 | Weld.C0 = CFrame.new(0, 0.1, 0.17) * CFrame.fromEulerAnglesXYZ(0, math.rad(i), 0) | |
| 203 | end | |
| 204 | ||
| 205 | local Part = Instance.new("Part")
| |
| 206 | Part.Material = "Neon" | |
| 207 | Part.Name = "Hand Hour" | |
| 208 | Part.FormFactor = "Custom" | |
| 209 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 210 | Part.BrickColor = HourHandColor | |
| 211 | Part.TopSurface = 0 | |
| 212 | Part.BottomSurface = 0 | |
| 213 | Part.Parent = Parts | |
| 214 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.03 / 0.2, 0.015 / 0.2, 0.1 / 0.2)
| |
| 215 | local Weld = Instance.new("Weld", Part)
| |
| 216 | Weld.Part0 = Weld.Parent | |
| 217 | Weld.Part1 = MasterPart2 | |
| 218 | Weld.C0 = CFrame.new(0, 0.11, 0.05) | |
| 219 | ||
| 220 | local Part = Instance.new("Part")
| |
| 221 | Part.Material = "Neon" | |
| 222 | Part.Name = "Hand Minute" | |
| 223 | Part.FormFactor = "Custom" | |
| 224 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 225 | Part.BrickColor = MinuteHandColor | |
| 226 | Part.TopSurface = 0 | |
| 227 | Part.BottomSurface = 0 | |
| 228 | Part.Parent = Parts | |
| 229 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.02 / 0.2, 0.0125 / 0.2, 0.15 / 0.2)
| |
| 230 | local Weld = Instance.new("Weld", Part)
| |
| 231 | Weld.Part0 = Weld.Parent | |
| 232 | Weld.Part1 = MasterPart2 | |
| 233 | Weld.C0 = CFrame.new(0, 0.11, 0.075) | |
| 234 | ||
| 235 | local Part = Instance.new("Part")
| |
| 236 | Part.Material = "Neon" | |
| 237 | Part.Name = "Hand Second" | |
| 238 | Part.FormFactor = "Custom" | |
| 239 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 240 | Part.BrickColor = SecondHandColor | |
| 241 | Part.TopSurface = 0 | |
| 242 | Part.BottomSurface = 0 | |
| 243 | Part.Parent = Parts | |
| 244 | Instance.new("BlockMesh", Part).Scale = Vector3.new(0.01 / 0.2, 0.01 / 0.2, 0.17 / 0.2)
| |
| 245 | local Weld = Instance.new("Weld", Part)
| |
| 246 | Weld.Part0 = Weld.Parent | |
| 247 | Weld.Part1 = MasterPart2 | |
| 248 | Weld.C0 = CFrame.new(0, 0.11, 0.085) | |
| 249 | ||
| 250 | for _, Part in pairs(Parts:GetChildren()) do | |
| 251 | Part.Locked = true | |
| 252 | Part.CanCollide = false | |
| 253 | end | |
| 254 | ||
| 255 | coroutine.wrap(function() | |
| 256 | while Parts.Parent ~= nil do | |
| 257 | local Hours, Minutes, Seconds = Time() | |
| 258 | --SoundToServer("Tick", "http://www.roblox.com/Asset/?id=14863866", 5, 0.5, false, Parts:FindFirstChild("Watch"))
| |
| 259 | pcall(function() Parts["Hand Hour"].Weld.C1 = CFrame.fromEulerAnglesXYZ(0, (math.pi * (Hours / 12) * 2) - math.rad(90), 0) end) | |
| 260 | pcall(function() Parts["Hand Minute"].Weld.C1 = CFrame.fromEulerAnglesXYZ(0, (math.pi * (Minutes / 60) * 2) - math.rad(90), 0) end) | |
| 261 | pcall(function() Parts["Hand Second"].Weld.C1 = CFrame.fromEulerAnglesXYZ(0, (math.pi * (Seconds / 60) * 2) - math.rad(90), 0) end) | |
| 262 | wait(1) | |
| 263 | end | |
| 264 | end)() | |
| 265 | end | |
| 266 | ||
| 267 | ||
| 268 | - | function RemoveParts(Parent, Format) |
| 268 | + | |
| 269 | if Character == nil then return false end | |
| 270 | - | pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end) |
| 270 | + | |
| 271 | - | elseif Format == 2 then |
| 271 | + | |
| 272 | - | pcall(function() Parent[ModelName]:Remove() end) |
| 272 | + | |
| 273 | Character.Torso:FindFirstChild("Right Hip 2"),
| |
| 274 | Character.Torso:FindFirstChild("Left Hip 2")
| |
| 275 | } | |
| 276 | if Joints[Joint] == nil then return false end | |
| 277 | if Joint == 1 or Joint == 3 then | |
| 278 | Joints[Joint].DesiredAngle = Angle | |
| 279 | end | |
| 280 | if Joint == 2 or Joint == 4 then | |
| 281 | Joints[Joint].DesiredAngle = -Angle | |
| 282 | end | |
| 283 | end | |
| 284 | ||
| 285 | function onButton1Down(Mouse) | |
| 286 | if Button1Down == true then return end | |
| 287 | Button1Down = true | |
| 288 | if CheckPlayer() == false then return end | |
| 289 | if CanUse == true then | |
| 290 | CanUse = false | |
| 291 | DisableLimb(1, Player.Character) | |
| 292 | SetSpeed(1, 0.5, Player.Character) | |
| 293 | SetAngle(1, 0, Player.Character) | |
| 294 | RemoveParts(Player.Character, 1) | |
| 295 | - | function ForceAngle(Joint, Angle, Character) |
| 295 | + | |
| 296 | wait(0.2) | |
| 297 | for i = 0, 1, 0.075 do | |
| 298 | pcall(function() | |
| 299 | Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), math.rad(-5 * i), math.rad(180 - (15 * i))) | |
| 300 | Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.15 * i), 0.5, -0.2 * i) * CFrame.fromEulerAnglesXYZ(math.rad(100 * i), math.rad(90 + (130 * i)), math.rad(40 * i)) | |
| 301 | end) | |
| 302 | wait() | |
| 303 | end | |
| 304 | pcall(function() | |
| 305 | Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130), math.rad(-5), math.rad(165)) | |
| 306 | - | Joints[Joint].CurrentAngle = Angle |
| 306 | + | |
| 307 | end) | |
| 308 | wait(0.1) | |
| 309 | CanUse = true | |
| 310 | - | Joints[Joint].CurrentAngle = -Angle |
| 310 | + | |
| 311 | while Selected == true and Button1Down == true do | |
| 312 | wait() | |
| 313 | end | |
| 314 | CanUse = false | |
| 315 | - | function SetSpeed(Joint, Speed, Character) |
| 315 | + | |
| 316 | pcall(function() | |
| 317 | Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), math.rad(-5 * i), math.rad(180 - (15 * i))) | |
| 318 | Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.15 * i), 0.5, -0.2 * i) * CFrame.fromEulerAnglesXYZ(math.rad(100 * i), math.rad(90 + (130 * i)), math.rad(40 * i)) | |
| 319 | end) | |
| 320 | wait() | |
| 321 | end | |
| 322 | pcall(function() | |
| 323 | Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) | |
| 324 | - | Joints[Joint].MaxVelocity = Speed |
| 324 | + | |
| 325 | end | |
| 326 | end | |
| 327 | ||
| 328 | ||
| 329 | function onButton1Up(Mouse) | |
| 330 | Button1Down = false | |
| 331 | end | |
| 332 | ||
| 333 | ||
| 334 | function onKeyDown(Key, Mouse) | |
| 335 | if Selected == false then return end | |
| 336 | Key = Key:lower() | |
| 337 | if Button1Down == false and CanUse == true and CheckPlayer() == true then | |
| 338 | if Key == "q" then | |
| 339 | if Mouse.Target == nil then return end | |
| 340 | if CheckPlayer() == false then return end | |
| 341 | local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
| |
| 342 | if NewPlayer == nil then return end | |
| 343 | if NewPlayer.Character == nil then return end | |
| 344 | if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
| |
| 345 | if (NewPlayer.Character.Torso.Position - Player.Character.Torso.Position).magnitude > 10 then return end | |
| 346 | onDeselected(Mouse) | |
| 347 | wait() | |
| 348 | RemoveParts(Player.Character, 1) | |
| 349 | script.Parent.Parent = NewPlayer.Backpack | |
| 350 | Player = NewPlayer | |
| 351 | end | |
| 352 | end | |
| 353 | end | |
| 354 | ||
| 355 | ||
| 356 | function onSelected(Mouse) | |
| 357 | if Selected == true or CanUse == false then return end | |
| 358 | CanUse = false | |
| 359 | while true do | |
| 360 | if CheckPlayer() == true then | |
| 361 | if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil then
| |
| 362 | break | |
| 363 | end | |
| 364 | end | |
| 365 | wait(0.1) | |
| 366 | end | |
| 367 | Selected = true | |
| 368 | - | ResetLimbCFrame(1, Player.Character) |
| 368 | + | |
| 369 | - | RemoveParts(Player.Character, 2) |
| 369 | + | |
| 370 | - | CreateParts(Player.Character, 1) |
| 370 | + | |
| 371 | - | CanUse = true |
| 371 | + | |
| 372 | - | end)() |
| 372 | + | |
| 373 | end | |
| 374 | ||
| 375 | ||
| 376 | function onDeselected(Mouse) | |
| 377 | if Selected == false then return end | |
| 378 | Selected = false | |
| 379 | end | |
| 380 | ||
| 381 | ||
| 382 | if script.Parent.ClassName ~= "HopperBin" then | |
| 383 | if Player == nil then print("Error: Player not found!") return end
| |
| 384 | Tool = Instance.new("HopperBin")
| |
| 385 | Tool.Name = ModelName | |
| 386 | Tool.Parent = Player.Backpack | |
| 387 | script.Name = "Main" | |
| 388 | script.Parent = Tool | |
| 389 | elseif script.Parent.ClassName == "HopperBin" and Connected == false then | |
| 390 | Connected = true | |
| 391 | Player = script.Parent.Parent.Parent | |
| 392 | end wait() if script.Parent.ClassName == "HopperBin" then | |
| 393 | while script.Parent.Parent.ClassName ~= "Backpack" do | |
| 394 | wait() | |
| 395 | end | |
| 396 | script.Parent.Selected:connect(onSelected) | |
| 397 | script.Parent.Deselected:connect(onDeselected) | |
| 398 | CreateParts(Player.Character, 1) | |
| 399 | ||
| 400 | end |