Buncha minor fixes and tweaks.
This commit is contained in:
parent
8d26a1560f
commit
accb6218ee
|
|
@ -183,7 +183,7 @@ namespace BevelGenerator
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ProcessFileArg(string filePath)
|
static void ProcessModelFile(string filePath)
|
||||||
{
|
{
|
||||||
RobloxFile file = RobloxFile.Open(filePath);
|
RobloxFile file = RobloxFile.Open(filePath);
|
||||||
var exportBin = file.FindFirstChild<Folder>("ExportBin");
|
var exportBin = file.FindFirstChild<Folder>("ExportBin");
|
||||||
|
|
@ -240,6 +240,36 @@ namespace BevelGenerator
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ProcessObjFile(FileInfo info)
|
||||||
|
{
|
||||||
|
string objPath = info.FullName;
|
||||||
|
Mesh mesh = Mesh.FromObjFile(objPath);
|
||||||
|
|
||||||
|
string meshPath = objPath.Replace(info.Extension, ".mesh");
|
||||||
|
FileStream file = File.OpenWrite(meshPath);
|
||||||
|
|
||||||
|
using (file)
|
||||||
|
{
|
||||||
|
file.SetLength(0);
|
||||||
|
mesh.Save(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ProcessFileArg(string filePath)
|
||||||
|
{
|
||||||
|
FileInfo info = new FileInfo(filePath);
|
||||||
|
|
||||||
|
if (info.Extension == ".obj")
|
||||||
|
{
|
||||||
|
ProcessObjFile(info);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcessModelFile(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local humanoids = setmetatable({}, { __mode = 'k' })
|
local humanoids = {}
|
||||||
|
|
||||||
local player = game.Players.LocalPlayer
|
local player = game.Players.LocalPlayer
|
||||||
local pgui = player:WaitForChild("PlayerGui")
|
local pgui = player:WaitForChild("PlayerGui")
|
||||||
|
|
@ -35,8 +35,11 @@ local function setupHumanoid(h)
|
||||||
|
|
||||||
if char then
|
if char then
|
||||||
while not char:FindFirstChild("Head") do
|
while not char:FindFirstChild("Head") do
|
||||||
if h.Parent ~= char then break end
|
if h.Parent ~= char then
|
||||||
char.ChildAdded:wait()
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
char.ChildAdded:Wait()
|
||||||
end
|
end
|
||||||
|
|
||||||
local head = char:FindFirstChild("Head")
|
local head = char:FindFirstChild("Head")
|
||||||
|
|
@ -98,6 +101,7 @@ local function setupHumanoid(h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
onAncestryChanged()
|
onAncestryChanged()
|
||||||
h.AncestryChanged:Connect(onAncestryChanged)
|
h.AncestryChanged:Connect(onAncestryChanged)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@ local function updateSky()
|
||||||
lastTime = seconds
|
lastTime = seconds
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
skyAdorn.CFrame = CFrame.new(camera.CFrame.Position) * CFrame.new(Vector3.new(), sunDir)
|
skyAdorn.CFrame = CFrame.new(camera.CFrame.Position) * CFrame.new(Vector3.new(), sunDir)
|
||||||
skyAdorn.Parent = (nightFrame.BackgroundTransparency < 1 and camera or nil)
|
skyAdorn.Parent = (nightFrame.BackgroundTransparency < 1 and camera or nil)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,16 @@ local function restoreFlag(flag)
|
||||||
local flagStand = owner and owner.Part0
|
local flagStand = owner and owner.Part0
|
||||||
|
|
||||||
if owner and flagStand then
|
if owner and flagStand then
|
||||||
|
print("deleting grip")
|
||||||
|
|
||||||
for _,joint in pairs(flag:GetJoints()) do
|
for _,joint in pairs(flag:GetJoints()) do
|
||||||
if joint.Name == "RightGrip" then
|
if joint.Name == "RightGrip" then
|
||||||
joint:Destroy()
|
joint:Destroy()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("restoring name")
|
||||||
|
|
||||||
if flag.Name == "Handle" then
|
if flag.Name == "Handle" then
|
||||||
local tool = flag.Parent
|
local tool = flag.Parent
|
||||||
if tool:IsA("Tool") then
|
if tool:IsA("Tool") then
|
||||||
|
|
@ -28,16 +32,25 @@ local function restoreFlag(flag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flag.CFrame = flagStand.CFrame
|
print("restoring flag")
|
||||||
|
|
||||||
|
flag.Anchored = true
|
||||||
|
flag.CanCollide = true
|
||||||
flag.Parent = flagStand.Parent
|
flag.Parent = flagStand.Parent
|
||||||
|
|
||||||
wait()
|
flag.CFrame = flagStand.CFrame
|
||||||
|
* CFrame.new(0, flagStand.Size.Y / 2, 0)
|
||||||
|
* CFrame.new(0, flag.Size.Y / 2, 0)
|
||||||
|
|
||||||
flag.Velocity = Vector3.new()
|
flag.Velocity = Vector3.new()
|
||||||
flag.RotVelocity = Vector3.new()
|
flag.RotVelocity = Vector3.new()
|
||||||
|
|
||||||
owner.Part1 = flag
|
wait()
|
||||||
|
|
||||||
|
owner.Enabled = true
|
||||||
flag.Anchored = false
|
flag.Anchored = false
|
||||||
|
|
||||||
|
print("done!")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -101,7 +114,7 @@ local function mountFlagAsTool(flag, humanoid)
|
||||||
CollectionService:AddTag(tool, "Flag")
|
CollectionService:AddTag(tool, "Flag")
|
||||||
|
|
||||||
tool.Parent = workspace
|
tool.Parent = workspace
|
||||||
owner.Part1 = nil
|
owner.Enabled = false
|
||||||
|
|
||||||
flag.Name = "Handle"
|
flag.Name = "Handle"
|
||||||
flag.Parent = tool
|
flag.Parent = tool
|
||||||
|
|
@ -117,6 +130,7 @@ local function onFlagAdded(flag)
|
||||||
|
|
||||||
-- Mount TeamColor
|
-- Mount TeamColor
|
||||||
local teamColor = flag:FindFirstChild("TeamColor")
|
local teamColor = flag:FindFirstChild("TeamColor")
|
||||||
|
local flagBackup
|
||||||
|
|
||||||
if not teamColor then
|
if not teamColor then
|
||||||
teamColor = Instance.new("BrickColorValue")
|
teamColor = Instance.new("BrickColorValue")
|
||||||
|
|
@ -136,8 +150,7 @@ local function onFlagAdded(flag)
|
||||||
end
|
end
|
||||||
|
|
||||||
if flagStand then
|
if flagStand then
|
||||||
owner = Instance.new("Weld")
|
owner = Instance.new("WeldConstraint")
|
||||||
owner.C0 = flagStand.CFrame:ToObjectSpace(flag.CFrame)
|
|
||||||
owner.Name = "FlagStand"
|
owner.Name = "FlagStand"
|
||||||
owner.Part0 = flagStand
|
owner.Part0 = flagStand
|
||||||
owner.Parent = flag
|
owner.Parent = flag
|
||||||
|
|
@ -152,26 +165,6 @@ local function onFlagAdded(flag)
|
||||||
CollectionService:AddTag(owner, "GorillaGlue")
|
CollectionService:AddTag(owner, "GorillaGlue")
|
||||||
end
|
end
|
||||||
|
|
||||||
spawn(function ()
|
|
||||||
-- Try to keep the flag from falling out of the world.
|
|
||||||
local deathPlane = workspace.FallenPartsDestroyHeight
|
|
||||||
|
|
||||||
while flag:IsDescendantOf(workspace) do
|
|
||||||
if flag.Position.Y < deathPlane + 200 then
|
|
||||||
local tool = flag.Parent
|
|
||||||
|
|
||||||
if tool:IsA("Tool") then
|
|
||||||
tool.Parent = workspace
|
|
||||||
wait()
|
|
||||||
end
|
|
||||||
|
|
||||||
restoreFlag(flag)
|
|
||||||
end
|
|
||||||
|
|
||||||
wait()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
local function onTouched(hit)
|
local function onTouched(hit)
|
||||||
local char = hit.Parent
|
local char = hit.Parent
|
||||||
if char then
|
if char then
|
||||||
|
|
@ -184,8 +177,10 @@ local function onFlagAdded(flag)
|
||||||
end
|
end
|
||||||
|
|
||||||
if player.TeamColor == teamColor.Value then
|
if player.TeamColor == teamColor.Value then
|
||||||
if owner.Part1 ~= flag then
|
if owner and owner.Part1 ~= flag then
|
||||||
restoreFlag(flag)
|
restoreFlag(flag)
|
||||||
|
elseif owner == nil then
|
||||||
|
flag = nil
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mountFlagAsTool(flag, humanoid)
|
mountFlagAsTool(flag, humanoid)
|
||||||
|
|
@ -194,7 +189,55 @@ local function onFlagAdded(flag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flag.Touched:Connect(onTouched)
|
spawn(function ()
|
||||||
|
local deathPlane = workspace.FallenPartsDestroyHeight
|
||||||
|
|
||||||
|
while wait() do
|
||||||
|
-- Try to keep the flag from falling out of the world.
|
||||||
|
if not flagBackup then
|
||||||
|
flagBackup = flag:Clone()
|
||||||
|
end
|
||||||
|
|
||||||
|
local resetClock = 400
|
||||||
|
flag.Touched:Connect(onTouched)
|
||||||
|
|
||||||
|
while flag:IsDescendantOf(workspace) do
|
||||||
|
if flag.Position.Y < deathPlane + 200 then
|
||||||
|
local tool = flag.Parent
|
||||||
|
|
||||||
|
if tool:IsA("Tool") then
|
||||||
|
tool.Parent = workspace
|
||||||
|
wait()
|
||||||
|
end
|
||||||
|
|
||||||
|
restoreFlag(flag)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (flag and owner) and not owner.Enabled and not flag.Parent:IsA("Tool") then
|
||||||
|
resetClock = resetClock - 1
|
||||||
|
|
||||||
|
if resetClock <= 0 then
|
||||||
|
restoreFlag(flag)
|
||||||
|
resetClock = 400
|
||||||
|
end
|
||||||
|
else
|
||||||
|
resetClock = 400
|
||||||
|
end
|
||||||
|
|
||||||
|
wait()
|
||||||
|
end
|
||||||
|
|
||||||
|
flag:Destroy()
|
||||||
|
|
||||||
|
flag = flagBackup:Clone()
|
||||||
|
flag.Parent = workspace
|
||||||
|
|
||||||
|
owner = flag.FlagStand
|
||||||
|
restoreFlag(flag)
|
||||||
|
|
||||||
|
wait()
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
for _,flag in pairs(CollectionService:GetTagged(FlagInstance)) do
|
for _,flag in pairs(CollectionService:GetTagged(FlagInstance)) do
|
||||||
|
|
@ -258,8 +301,8 @@ local function onFlagStandAdded(flagStand)
|
||||||
restoreFlag(handle)
|
restoreFlag(handle)
|
||||||
|
|
||||||
tool:Destroy()
|
tool:Destroy()
|
||||||
|
|
||||||
wait(1)
|
wait(1)
|
||||||
|
|
||||||
debounce = false
|
debounce = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
"Disabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
wait(24)
|
||||||
|
script.Parent:Destroy()
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
local Debris = game:GetService("Debris")
|
local ball = script.Parent
|
||||||
|
local damage = 20
|
||||||
ball = script.Parent
|
|
||||||
damage = 20
|
|
||||||
|
|
||||||
function onTouched(hit)
|
function onTouched(hit)
|
||||||
if not (hit.CanCollide and hit.Parent) then
|
if not (hit.CanCollide and hit.Parent) then
|
||||||
|
|
@ -10,7 +8,7 @@ function onTouched(hit)
|
||||||
|
|
||||||
local humanoid = hit.Parent:findFirstChild("Humanoid")
|
local humanoid = hit.Parent:findFirstChild("Humanoid")
|
||||||
|
|
||||||
if hit:getMass() < 1.2 * 200 then
|
if hit:GetMass() < 1.2 * 200 then
|
||||||
hit.BrickColor = ball.BrickColor
|
hit.BrickColor = ball.BrickColor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -22,13 +20,15 @@ function onTouched(hit)
|
||||||
s.Size = Vector3.new(1,.4,1)
|
s.Size = Vector3.new(1,.4,1)
|
||||||
s.BrickColor = ball.BrickColor
|
s.BrickColor = ball.BrickColor
|
||||||
|
|
||||||
local v = Vector3.new(math.random(-1,1), math.random(0,1), math.random(-1,1))
|
local cleanup = ball.BrickCleanup:Clone()
|
||||||
|
cleanup.Disabled = false
|
||||||
|
cleanup.Parent = s
|
||||||
|
|
||||||
|
local v = Vector3.new(math.random(-1, 1), math.random(0, 1), math.random(-1, 1))
|
||||||
s.Velocity = 15 * v
|
s.Velocity = 15 * v
|
||||||
s.CFrame = CFrame.new(ball.Position + v, v)
|
s.CFrame = CFrame.new(ball.Position + v, v)
|
||||||
|
|
||||||
Debris:AddItem(s, 24)
|
s.Parent = workspace
|
||||||
|
|
||||||
s.Parent = game.Workspace
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@ function untagHumanoid(humanoid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
connection = ball.Touched:connect(onTouched)
|
connection = ball.Touched:Connect(onTouched)
|
||||||
|
|
||||||
wait(8)
|
wait(8)
|
||||||
ball.Parent = nil
|
ball:Destroy()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local Debris = game:GetService("Debris")
|
local Players = game:GetService("Players")
|
||||||
local Tool = script.Parent
|
local Tool = script.Parent
|
||||||
|
|
||||||
local fireSound = Instance.new("Sound")
|
local fireSound = Instance.new("Sound")
|
||||||
|
|
@ -13,15 +13,15 @@ local function fire(v)
|
||||||
fireSound:Play()
|
fireSound:Play()
|
||||||
|
|
||||||
local vCharacter = Tool.Parent
|
local vCharacter = Tool.Parent
|
||||||
local vPlayer = game.Players:playerFromCharacter(vCharacter)
|
local vPlayer = Players:GetPlayerFromCharacter(vCharacter)
|
||||||
|
|
||||||
local missile = Instance.new("Part")
|
local missile = Instance.new("Part")
|
||||||
|
|
||||||
local spawnPos = vCharacter.PrimaryPart.Position
|
local spawnPos = vCharacter.PrimaryPart.Position
|
||||||
spawnPos = spawnPos + (v * 8)
|
spawnPos = spawnPos + (v * 8)
|
||||||
|
|
||||||
missile.Position = spawnPos
|
missile.Position = spawnPos
|
||||||
missile.Size = Vector3.new(1,1,1)
|
missile.Size = Vector3.new(1, 1, 1)
|
||||||
missile.Velocity = v * 100
|
missile.Velocity = v * 100
|
||||||
missile.BrickColor = BrickColor.new(colors[math.random(1, #colors)])
|
missile.BrickColor = BrickColor.new(colors[math.random(1, #colors)])
|
||||||
missile.Shape = 0
|
missile.Shape = 0
|
||||||
|
|
@ -36,10 +36,13 @@ local function fire(v)
|
||||||
force.force = Vector3.new(0,45,0)
|
force.force = Vector3.new(0,45,0)
|
||||||
force.Parent = missile
|
force.Parent = missile
|
||||||
|
|
||||||
local new_script = Tool.Paintball:clone()
|
local new_script = Tool.Paintball:Clone()
|
||||||
new_script.Disabled = false
|
new_script.Disabled = false
|
||||||
new_script.Parent = missile
|
new_script.Parent = missile
|
||||||
|
|
||||||
|
local brickCleanup = Tool.BrickCleanup:Clone()
|
||||||
|
brickCleanup.Parent = missile
|
||||||
|
|
||||||
local creator_tag = Instance.new("ObjectValue")
|
local creator_tag = Instance.new("ObjectValue")
|
||||||
creator_tag.Value = vPlayer
|
creator_tag.Value = vPlayer
|
||||||
creator_tag.Name = "creator"
|
creator_tag.Name = "creator"
|
||||||
|
|
@ -47,23 +50,20 @@ local function fire(v)
|
||||||
|
|
||||||
missile.Parent = game.Workspace
|
missile.Parent = game.Workspace
|
||||||
missile:SetNetworkOwner(vPlayer)
|
missile:SetNetworkOwner(vPlayer)
|
||||||
|
|
||||||
Debris:AddItem(missile, 24)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Tool.Enabled = true
|
Tool.Enabled = true
|
||||||
function onActivated()
|
|
||||||
|
|
||||||
|
function onActivated()
|
||||||
if not Tool.Enabled then
|
if not Tool.Enabled then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
Tool.Enabled = false
|
Tool.Enabled = false
|
||||||
|
|
||||||
local character = Tool.Parent;
|
local character = Tool.Parent
|
||||||
local humanoid = character.Humanoid
|
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
|
||||||
|
|
||||||
if humanoid == nil then
|
if humanoid == nil then
|
||||||
print("Humanoid not found")
|
print("Humanoid not found")
|
||||||
return
|
return
|
||||||
|
|
@ -73,11 +73,9 @@ function onActivated()
|
||||||
local lookAt = (targetPos - character.Head.Position).unit
|
local lookAt = (targetPos - character.Head.Position).unit
|
||||||
|
|
||||||
fire(lookAt)
|
fire(lookAt)
|
||||||
|
|
||||||
wait(.5)
|
wait(.5)
|
||||||
|
|
||||||
Tool.Enabled = true
|
Tool.Enabled = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Tool.Activated:connect(onActivated)
|
||||||
script.Parent.Activated:connect(onActivated)
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"properties":
|
||||||
|
{
|
||||||
|
"Disabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
local brick = script.Parent
|
||||||
|
brick:MakeJoints()
|
||||||
|
|
||||||
|
wait(24)
|
||||||
|
brick:Destroy()
|
||||||
|
|
@ -13,9 +13,15 @@ local function placeBrick(cf, pos, color)
|
||||||
local brick = Instance.new("Part")
|
local brick = Instance.new("Part")
|
||||||
brick.BrickColor = color
|
brick.BrickColor = color
|
||||||
brick.CFrame = cf * CFrame.new(pos + brick.Size / 2)
|
brick.CFrame = cf * CFrame.new(pos + brick.Size / 2)
|
||||||
brick.Parent = workspace
|
|
||||||
Debris:AddItem(brick, 24)
|
|
||||||
|
|
||||||
|
local brickScript = Tool.TrowelBrick:Clone()
|
||||||
|
brickScript.Disabled = false
|
||||||
|
brickScript.Parent = brick
|
||||||
|
|
||||||
|
-- place the brick
|
||||||
|
brick.Parent = workspace
|
||||||
|
|
||||||
|
-- return brick info
|
||||||
return brick, pos + brick.Size
|
return brick, pos + brick.Size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -46,8 +52,7 @@ local function buildWall(cf)
|
||||||
return bricks
|
return bricks
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function snap(v)
|
||||||
function snap(v)
|
|
||||||
if math.abs(v.X) > math.abs(v.Z) then
|
if math.abs(v.X) > math.abs(v.Z) then
|
||||||
if v.X > 0 then
|
if v.X > 0 then
|
||||||
return Vector3.new(1, 0, 0)
|
return Vector3.new(1, 0, 0)
|
||||||
|
|
@ -65,7 +70,7 @@ end
|
||||||
|
|
||||||
Tool.Enabled = true
|
Tool.Enabled = true
|
||||||
|
|
||||||
function onActivated()
|
local function onActivated()
|
||||||
if not Tool.Enabled then
|
if not Tool.Enabled then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue