Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local InsertService = game:GetService("InsertService")
- local pistolssetId = 24073203 -- GUN_ID
- local truckassetId = 83291374
- local lplr = game.Players.LocalPlayer
- --workspace.Baseplate:Destroy()
- --say ;pistol to spawn it
- --mech id - 85853456
- --kart id - 85773796
- function spawnAsset(plr, assetId)
- local asset = InsertService:LoadAsset(assetId)
- asset.Parent = workspace
- asset:MoveTo(workspace[plr].Torso.Position)
- asset:MakeJoints()
- end
- function chatted(msg)
- if msg:sub(1, 7) == ";pistol" and #msg == 7 then
- spawnAsset(lplr.Name, pistolssetId)
- elseif msg:sub(1, 7) == ";pistol" and #msg > 7 then
- if workspace:findFirstChild(msg:sub(9,#msg)) then
- spawnAsset(msg:sub(9,#msg), pistolssetId)
- end
- end
- if msg:sub(1,8) == ";explode" and #msg == 8 then
- local ex = Instance.new("Explosion", lplr.Character.Torso)
- ex.Position = lplr.Character.Torso.Position
- elseif msg:sub(1,8) == ";explode" and #msg > 8 then
- if workspace:findFirstChild(msg:sub(10,#msg)) then
- local ex = Instance.new("Explosion", workspace:findFirstChild(msg:sub(10,#msg)).Torso)
- ex.Position = workspace:findFirstChild(msg:sub(10,#msg)).Torso.Position
- end
- end
- if msg:sub(1,7) == ";insert" and #msg >= 9 then
- pcall(spawnAsset(lplr.Name, msg:sub(9,#msg)))
- end
- if msg:sub(1,6) == ";truck" and #msg == 6 then
- spawnAsset(lplr.Name, truckassetId)
- elseif msg:sub(1,6) == ";truck" and #msg > 6 then
- if workspace:findFirstChild(msg:sub(8,#msg)) then
- spawnAsset(msg:sub(8,#msg), truckassetId)
- end
- end
- end
- game.Players.LocalPlayer.Chatted:connect(chatted)
- game:GetService("Chat"):Chat(lplr.Character.Head,"Commands Loaded. Made by: Cazum93")
- wait(3)
- game:GetService("Chat"):Chat(lplr.Character.Head,"Prefix is: ';', CMDS: pistol, explode, insert, truck. To use the command on you, dont put the player's name")
Advertisement
Add Comment
Please, Sign In to add comment